[
https://issues.apache.org/jira/browse/YARN-8106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16424103#comment-16424103
]
Prabhu Joseph commented on YARN-8106:
-------------------------------------
[~leftnoteasy] Looks it's even before YARN-7697. The
LogAggregationIndexedFileController uses read(byte[]) expecting it would read
complete contents of log file. But it need not as per java doc -
https://docs.oracle.com/javase/7/docs/api/java/io/DataInputStream.html?is-external=true#read(byte[]).
readFully(byte[) can be used.
{code}
int actual = fsDataIStream.read(array);
if (actual != offset) {
throw new IOException("Error on loading log meta from "
+ remoteLogPath);
}
{code}
> LogAggregationIndexedFileController - Can not get log meta from the log
> ------------------------------------------------------------------------
>
> Key: YARN-8106
> URL: https://issues.apache.org/jira/browse/YARN-8106
> Project: Hadoop YARN
> Issue Type: Bug
> Components: log-aggregation
> Reporter: Prabhu Joseph
> Assignee: Prabhu Joseph
> Priority: Major
>
> yarn logs command fails with below error message. Found
> LogAggregationIndexedFileController uses read() to read the contents of
> remoteLog into byte array which sometimes does not read full contents and so
> actual bytes read is not same as offset leading to IOException. readFully()
> can be used.
> {code}
> WARN ifile.LogAggregationIndexedFileController: Can not get log meta from the
> log
> Error on loading log meta from
> if (actual != offset) {
> throw new IOException("Error on loading log meta from "
> + remoteLogPath);
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]