Repository: spark Updated Branches: refs/heads/branch-1.4 0b71b851d -> 3ba6fc515
[SPARK-8098] [WEBUI] Show correct length of bytes on log page The log page should only show desired length of bytes. Currently it shows bytes from the startIndex to the end of the file. The "Next" button on the page is always disabled. Author: Carson Wang <[email protected]> Closes #6640 from carsonwang/logpage and squashes the following commits: 58cb3fd [Carson Wang] Show correct length of bytes on log page (cherry picked from commit 63bc0c4430680cce230dd7a10d34da0492351446) Signed-off-by: Tathagata Das <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/3ba6fc51 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/3ba6fc51 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/3ba6fc51 Branch: refs/heads/branch-1.4 Commit: 3ba6fc515d6ea45c281bb81f648a38523be06383 Parents: 0b71b85 Author: Carson Wang <[email protected]> Authored: Thu Jun 4 16:24:50 2015 -0700 Committer: Tathagata Das <[email protected]> Committed: Thu Jun 4 16:25:05 2015 -0700 ---------------------------------------------------------------------- .../src/main/scala/org/apache/spark/deploy/worker/ui/LogPage.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/3ba6fc51/core/src/main/scala/org/apache/spark/deploy/worker/ui/LogPage.scala ---------------------------------------------------------------------- diff --git a/core/src/main/scala/org/apache/spark/deploy/worker/ui/LogPage.scala b/core/src/main/scala/org/apache/spark/deploy/worker/ui/LogPage.scala index 53f8f9a..5a1d06e 100644 --- a/core/src/main/scala/org/apache/spark/deploy/worker/ui/LogPage.scala +++ b/core/src/main/scala/org/apache/spark/deploy/worker/ui/LogPage.scala @@ -159,7 +159,7 @@ private[ui] class LogPage(parent: WorkerWebUI) extends WebUIPage("logPage") with offset } } - val endIndex = math.min(startIndex + totalLength, totalLength) + val endIndex = math.min(startIndex + byteLength, totalLength) logDebug(s"Getting log from $startIndex to $endIndex") val logText = Utils.offsetBytes(files, startIndex, endIndex) logDebug(s"Got log of length ${logText.length} bytes") --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
