YARN-8106. Update LogAggregationIndexedFileController to use readFull instead read to avoid IOException while loading log meta. (Prabhu Joseph via wangda)
Change-Id: I63a65f73f8d1636e2c99ed9c8c2bbd05efcff80f
(cherry picked from commit b779f4f0f6
)
This commit is contained in:
parent
1a125dd92f
commit
2f326159f1
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue