diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java index 5bba2e0a40..a8ae06f876 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java @@ -865,7 +865,8 @@ public class LogAggregationIndexedFileController byte[] array = new byte[offset]; fsDataIStream.seek( fileLength - offset - Integer.SIZE/ Byte.SIZE - UUID_LENGTH); - int actual = fsDataIStream.read(array); + fsDataIStream.readFully(array); + int actual = array.length; if (actual != offset) { throw new IOException("Error on loading log meta from " + remoteLogPath);