Skip to content
Snippets Groups Projects
Commit 6d054487 authored by Karen Feng's avatar Karen Feng
Browse files

Replace default buffer value to 100 GB, changed buttons to use String...

Replace default buffer value to 100 GB, changed buttons to use String notation, removed default buffer parameter in UI URLs
parent a3278410
No related branches found
No related tags found
No related merge requests found
......@@ -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>
......
......@@ -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>
......
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment