[ 
https://issues.apache.org/jira/browse/HDFS-758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779120#action_12779120
 ] 

Suresh Srinivas commented on HDFS-758:
--------------------------------------

# Check for 80 char column size in the code
# Instead of assertTrue to check equality, use assertEquals in tests
# BlockManager.java 
#* remove import of org.mortbay.log.Log and use FSNameSystem.LOG for logging
#* isReplicationInProgress() - logging information about block can be moved to 
separate method for better readability. Also move setting status = true to 
pervious {{if (!status))}} block.
#* isReplicationInProgress() - should 
blocksWithOnlyDecommissioningReplicasCount be incremented {{if (curReplicas == 
0 && num.decommissioningReplicas() > 0). Second condition is the new addition.
#* isReplicationInProgress() - consistent and shorter naming - 
underReplicatedCount to underReplicatedBlocks, 
blocksOnlyWithDecommissionReplicasCount to decommissionOnlyReplicas, 
underRepBlocksInFilesUnderConstruction to underReplicatedInOpenFiles.
# DatanodeDescriptor.java 
#* make {{DecommissioningStatus}} and member {{decommissioningStatus}} package 
private and move all the related method into the class. Methods can be directly 
called on {{decommissioningStatus}} to set and get the data.
#* renaming - setBlockCountsInDecommissioning to set, 
getUnderRepBlockCountInDecommission to getUnderReplicatedBlocks, 
getBlocksWithOnlyDecommissionReplicas to getDecommissionOnlyReplicas(), 
getDecommissioningUnderRepBlocksInFilesUnderConstruction to 
getUnderReplicatedInOpenFiles, setDecommissionStartTime to setStartTime, 
getDecommissioningStartTime to getStartTime, 
DecommissionStatus.decommissionStartTime to DecommissionStatus.startTime.
#* Should block and replica counts be int instead of long?
# FSNamesystem
#* startDecommission() - setting the decommission start tiem should move 
DatanodeDescriptor.startDecommission(). Also the check if 
isDecommissionInProgress() && isDecommissioned should happen in 
startDecommission().
#* startDecommission() - checkDecommissionStateInternal() replaces some code. 
They do not seem to be equivalent code.
#* getDecommissioningNodes - instead of getDataNodeListForReport(ALL), 
getDataNodeListForReport(LIVE) should suffice.
# NamenodeJspHelper
#* LOG should use NameJspHelper.class
#* Should NamenodeJspHelper.generateDecommissioningNodeData() return 
immediately if the node is not decommissioning or decommissioned?
#* generateHealthReport() - is it a good idea to have a method in FSNamesystem, 
getDecommissioningNodeCount(), instead of having to rely on 
getDecommissioningNodes, which returns an ArrayList, just to print the count?
#* generateNodesList() - please check whatNodes.equals(DECOMMISSIONING) in the 
else condition. typo Decommissioing. Also building {{decommissioning}} nodes 
should be done when whatNodes == DECOMMISSIONING.

I have not reviewed the test changes yet.


> Improve reporting of progress of decommissioning
> ------------------------------------------------
>
>                 Key: HDFS-758
>                 URL: https://issues.apache.org/jira/browse/HDFS-758
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Jitendra Nath Pandey
>            Assignee: Jitendra Nath Pandey
>         Attachments: HDFS-758.1.patch, HDFS-758.2.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to