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

This commit is contained in:
Junping Du 2017-11-01 14:48:16 -07:00
parent 70f1a9470c
commit d57dba9942
1 changed files with 2 additions and 2 deletions

View File

@ -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();