[
https://issues.apache.org/jira/browse/HDFS-4252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507616#comment-13507616
]
Suresh Srinivas commented on HDFS-4252:
---------------------------------------
Current code:
{noformat}
try {
opcode = in.readByte();
if (opcode == OP_INVALID) {
LOG.info("Invalid opcode, reached end of edit log " +
"Number of transactions found: " + numEdits + ". " +
"Bytes read: " + tracker.getPos());
break; // no more transactions
}
} catch (EOFException e) {
LOG.info("Reading " + edits.getName() + ": " + e);
break; // no more transactions
}
{noformat}
On catching exception we should print the same log as we print when
encountering OP_INVALID in the above code. Print EOF does not make sense, as it
is expected and handled correctly as end of file.
> Improve confusing log message that prints exception when editlog read is
> completed
> ----------------------------------------------------------------------------------
>
> Key: HDFS-4252
> URL: https://issues.apache.org/jira/browse/HDFS-4252
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: namenode
> Affects Versions: 1.0.0
> Reporter: Suresh Srinivas
>
> Namenode prints a log with an exception to indicate successful completion of
> reading of logs. This causes misunderstanding where people have interpreted
> it as failure to load editlog. The log message could be better.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira