[
https://issues.apache.org/jira/browse/HDFS-6578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14040187#comment-14040187
]
Yongjun Zhang commented on HDFS-6578:
-------------------------------------
Hi [~arpit99],
Thanks for your comments. I didn't see it when I uploaded revision 002 for a
minor change.
About your comments. in patch 001, I wanted to give some more explanation why
the last BlockManager.processReport call is accurate, so I described it as
"accumulate" based on my understanding. This seems to be inaccurate. I wonder
if you could help saying a bit more on top of "The result of the last
BlockManager.processReport call is accurate"?
Say, since we are assigning noStaleStorages for each call, the patterns of
noStaleStorage value in the loop can be:
{code}
Iter 0 1 2 3 4 (end of loop)
pattern1. false, false, false, false, false
pattern2. true, true, true, true, true
pattern3. false, false, true, true, true
pattern4, true, true, false, false, false
pattern5. false, true, false, true, false
{code}
I didn't study the code hard enough, but my understanding (which seems to be
wrong) was that, pattern1 through pattern4 are valid, and pattern5 not. Based
on your description, it seems actually any pattern of the above patterns could
happen, each call get up-to-date return value based on what processed so far.
And the last iteration is most up-to-date. Is this understanding correct? If
so, can we say "The result of the last BlockManager.processReport call is most
up-to-date and accurate".
Thanks for your help toward my better understanding.
> add toString method to DatanodeStorage etc for easier debugging
> ---------------------------------------------------------------
>
> Key: HDFS-6578
> URL: https://issues.apache.org/jira/browse/HDFS-6578
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Yongjun Zhang
> Assignee: Yongjun Zhang
> Attachments: HDFS-6578.001.patch, HDFS-6578.002.patch
>
>
> It seems to be nice to add a toString() method for DatanodeStorage class, so
> we can print out its key info easier while doing debuging.
> Another thing is, in the end of BlockManager#processReport, there is the
> following message,
> {code}
> blockLog.info("BLOCK* processReport: from storage " +
> storage.getStorageID()
> + " node " + nodeID + ", blocks: " + newReport.getNumberOfBlocks()
> + ", processing time: " + (endTime - startTime) + " msecs");
> return !node.hasStaleStorages();
> {code}
> We could add node.hasStaleStorages() to the log, and possibly replace
> storage.getSorateID() with the suggested storage.toString().
> Any comments? thanks.
--
This message was sent by Atlassian JIRA
(v6.2#6252)