YARN-7400. Incorrect log preview displayed in jobhistory server ui. Contributed 
by Xuan Gong.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/d57dba99
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d57dba99
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d57dba99

Branch: refs/heads/YARN-1011
Commit: d57dba99428cbe3f3dfcec834d79f709e7529ef9
Parents: 70f1a94
Author: Junping Du <junping...@apache.org>
Authored: Wed Nov 1 14:48:16 2017 -0700
Committer: Junping Du <junping...@apache.org>
Committed: Wed Nov 1 14:48:16 2017 -0700

----------------------------------------------------------------------
 .../filecontroller/ifile/IndexedFileAggregatedLogsBlock.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/d57dba99/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/IndexedFileAggregatedLogsBlock.java
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/IndexedFileAggregatedLogsBlock.java
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/IndexedFileAggregatedLogsBlock.java
index 5439b53..db2915a 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/IndexedFileAggregatedLogsBlock.java
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/IndexedFileAggregatedLogsBlock.java
@@ -221,8 +221,8 @@ public class IndexedFileAggregatedLogsBlock extends 
LogAggregationHtmlBlock {
                       __(" for the full log.").__();
             }
             long totalSkipped = 0;
-            while (totalSkipped < start) {
-              long ret = in.skip(start - totalSkipped);
+            while (totalSkipped < startIndex) {
+              long ret = in.skip(startIndex - totalSkipped);
               if (ret == 0) {
                 //Read one byte
                 int nextByte = in.read();


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org

Reply via email to