[
https://issues.apache.org/jira/browse/HDFS-309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13219226#comment-13219226
]
Sho Shimauchi commented on HDFS-309:
------------------------------------
> seems like it should be a TRACE, or just deleted.
There are two reason to print such a log before writeLock():
- it's possible that writeLock() fails to lock. If this log is printed, we can
check if this happens or not.
- Saying explicitly why write lock is grabbed is informative.
This information is useful for developer rather than user, so I'll lower the
log level to TRACE.
Does this sound good?
> Is it possible to somehow find the path of the log being replayed?
File path can be got from EditLogInputStream.getName() , but it's a bit verbose
because FSImage output the file path too.
I've already printed the file path in FSEditLogLoader in below:
{quote}
2012-02-29 23:04:19,368 DEBUG namenode.FSImage (FSImage.java:loadEdits(649)) -
About to load edits:
/Users/sho/src/apache/hadoop-common/hadoop-hdfs-project/hadoop-hdfs/build/test/data/dfs/name1/current/edits_0000000000000000001-0000000000000000023
2012-02-29 23:04:19,369 INFO namenode.FSImage (FSImage.java:loadEdits(659)) -
Reading
/Users/sho/src/apache/hadoop-common/hadoop-hdfs-project/hadoop-hdfs/build/test/data/dfs/name1/current/edits_0000000000000000001-0000000000000000023
expecting start txid #1
2012-02-29 23:04:19,369 INFO namenode.FSEditLogLoader
(FSEditLogLoader.java:loadEditRecords(118)) - Acquiring write lock to replay
edit log
2012-02-29 23:04:19,370 DEBUG namenode.FSEditLogLoader
(FSEditLogLoader.java:loadEditRecords(127)) - edit log length: 1232, first
txid: 1, last txid: 23, name:
/Users/sho/src/apache/hadoop-common/hadoop-hdfs-project/hadoop-hdfs/build/test/data/dfs/name1/current/edits_0000000000000000001-0000000000000000023
2012-02-29 23:04:19,371 TRACE namenode.FSEditLogLoader
(FSEditLogLoader.java:loadEditRecords(145)) - replaying edit log: LogSegmentOp
[opCode=OP_START_LOG_SEGMENT, txid=1]
{quote}
I agree with other point. I'll fix them and update the patch.
Thanks for feedback!
> FSEditLog should log progress during replay
> -------------------------------------------
>
> Key: HDFS-309
> URL: https://issues.apache.org/jira/browse/HDFS-309
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Todd Lipcon
> Assignee: Sho Shimauchi
> Labels: newbie
> Attachments: HDFS-309.txt, HDFS-309.txt
>
>
> When the NameNode is replaying a long edit log, it's handy to have reports on
> how far through it is, so you can judge how much time it is remaining.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira