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 5439b534b05..db2915ab256 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();