aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorKaren Feng <karenfeng.us@gmail.com>2013-07-11 17:12:17 -0700
committerKaren Feng <karenfeng.us@gmail.com>2013-07-11 17:12:17 -0700
commit6d054487bf4c9e9aa9033187f73e4e9d8366bc37 (patch)
tree236ec740d1651b7a21333c2bb100bdcdf39ec9a2 /core
parenta32784109d11e061cdca2eced07ac01be2061056 (diff)
downloadspark-6d054487bf4c9e9aa9033187f73e4e9d8366bc37.tar.gz
spark-6d054487bf4c9e9aa9033187f73e4e9d8366bc37.tar.bz2
spark-6d054487bf4c9e9aa9033187f73e4e9d8366bc37.zip
Replace default buffer value to 100 GB, changed buttons to use String notation, removed default buffer parameter in UI URLs
Diffstat (limited to 'core')
-rw-r--r--core/src/main/scala/spark/deploy/master/ui/ApplicationPage.scala4
-rw-r--r--core/src/main/scala/spark/deploy/worker/ui/IndexPage.scala4
-rw-r--r--core/src/main/scala/spark/deploy/worker/ui/WorkerWebUI.scala12
3 files changed, 11 insertions, 9 deletions
diff --git a/core/src/main/scala/spark/deploy/master/ui/ApplicationPage.scala b/core/src/main/scala/spark/deploy/master/ui/ApplicationPage.scala
index b2589abb89..8553377d8f 100644
--- a/core/src/main/scala/spark/deploy/master/ui/ApplicationPage.scala
+++ b/core/src/main/scala/spark/deploy/master/ui/ApplicationPage.scala
@@ -90,9 +90,9 @@ private[spark] class ApplicationPage(parent: MasterWebUI) {
<td>{executor.memory}</td>
<td>{executor.state}</td>
<td>
- <a href={"%s/logPage?appId=%s&executorId=%s&logType=stdout&byteLength=10000"
+ <a href={"%s/logPage?appId=%s&executorId=%s&logType=stdout"
.format(executor.worker.webUiAddress, executor.application.id, executor.id)}>stdout</a>
- <a href={"%s/logPage?appId=%s&executorId=%s&logType=stderr&byteLength=10000"
+ <a href={"%s/logPage?appId=%s&executorId=%s&logType=stderr"
.format(executor.worker.webUiAddress, executor.application.id, executor.id)}>stderr</a>
</td>
</tr>
diff --git a/core/src/main/scala/spark/deploy/worker/ui/IndexPage.scala b/core/src/main/scala/spark/deploy/worker/ui/IndexPage.scala
index fc1ec31b4d..c515f2e238 100644
--- a/core/src/main/scala/spark/deploy/worker/ui/IndexPage.scala
+++ b/core/src/main/scala/spark/deploy/worker/ui/IndexPage.scala
@@ -89,9 +89,9 @@ private[spark] class IndexPage(parent: WorkerWebUI) {
</ul>
</td>
<td>
- <a href={"logPage?appId=%s&executorId=%s&logType=stdout&byteLength=10000"
+ <a href={"logPage?appId=%s&executorId=%s&logType=stdout"
.format(executor.appId, executor.execId)}>stdout</a>
- <a href={"logPage?appId=%s&executorId=%s&logType=stderr&byteLength=10000"
+ <a href={"logPage?appId=%s&executorId=%s&logType=stderr"
.format(executor.appId, executor.execId)}>stderr</a>
</td>
</tr>
diff --git a/core/src/main/scala/spark/deploy/worker/ui/WorkerWebUI.scala b/core/src/main/scala/spark/deploy/worker/ui/WorkerWebUI.scala
index 1ab65d41e8..4e7f86d77a 100644
--- a/core/src/main/scala/spark/deploy/worker/ui/WorkerWebUI.scala
+++ b/core/src/main/scala/spark/deploy/worker/ui/WorkerWebUI.scala
@@ -54,7 +54,7 @@ class WorkerWebUI(val worker: Worker, val workDir: File, requestedPort: Option[I
}
def log(request: HttpServletRequest): String = {
- val defaultBytes = 10000
+ val defaultBytes = 100 * 1024
val appId = request.getParameter("appId")
val executorId = request.getParameter("executorId")
val logType = request.getParameter("logType")
@@ -72,7 +72,7 @@ class WorkerWebUI(val worker: Worker, val workDir: File, requestedPort: Option[I
}
def logPage(request: HttpServletRequest): Seq[scala.xml.Node] = {
- val defaultBytes = 10000
+ val defaultBytes = 100 * 1024
val appId = request.getParameter("appId")
val executorId = request.getParameter("executorId")
val logType = request.getParameter("logType")
@@ -95,7 +95,8 @@ class WorkerWebUI(val worker: Worker, val workDir: File, requestedPort: Option[I
<a href={"?appId=%s&executorId=%s&logType=%s&offset=%s&byteLength=%s"
.format(appId, executorId, logType, math.max(startByte-byteLength, 0),
byteLength)}>
- <button>Previous {math.min(byteLength, startByte)} Bytes</button>
+ <button>Previous {Utils.memoryBytesToString(math.min(byteLength, startByte))} Bytes
+ </button>
</a>
}
else {
@@ -106,7 +107,8 @@ class WorkerWebUI(val worker: Worker, val workDir: File, requestedPort: Option[I
if (endByte < logLength) {
<a href={"?appId=%s&executorId=%s&logType=%s&offset=%s&byteLength=%s".
format(appId, executorId, logType, endByte, byteLength)}>
- <button>Next {math.min(byteLength, logLength-endByte)} Bytes</button>
+ <button>Next {Utils.memoryBytesToString(math.min(byteLength, logLength-endByte))} Bytes
+ </button>
</a>
}
else {
@@ -135,7 +137,7 @@ class WorkerWebUI(val worker: Worker, val workDir: File, requestedPort: Option[I
/** Determine the byte range for a log or log page. */
def getByteRange(path: String, offset: Option[Long], byteLength: Int)
: (Long, Long) = {
- val defaultBytes = 10000
+ val defaultBytes = 100 * 1024
val maxBytes = 1024 * 1024
val file = new File(path)