Repository: spark
Updated Branches:
  refs/heads/branch-1.3 3e8b0406a -> 5e77d69c7


[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/5e77d69c
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/5e77d69c
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/5e77d69c

Branch: refs/heads/branch-1.3
Commit: 5e77d69c72ee063e028bedba3f0a511d2775e3cd
Parents: 3e8b040
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:28 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/5e77d69c/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 41a2b5c..dcf70e1 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[spark] class LogPage(parent: WorkerWebUI) extends 
WebUIPage("logPage") w
           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]

Reply via email to