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

ASF GitHub Bot commented on HDFS-17058:
---------------------------------------

hfutatzhanghb commented on code in PR #5776:
URL: https://github.com/apache/hadoop/pull/5776#discussion_r1241467041


##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java:
##########
@@ -977,7 +977,6 @@ public void testChooseReplicaToDelete() throws Exception {
 
     //Even if this node has the most space, because the storage[5] has
     //the lowest it should be chosen in case of block delete.
-    storages[4].setRemainingForTests(100 * 1024 * 1024);

Review Comment:
   Hi, @zhangshuyan0 . Thanks a lot for reviewing.  In method 
TestReplicationPolicy#getDatanodeDescriptors, the datanodes[5] only has two 
storages: "storages[5]" and "storages[5]-extra". It does not have storages[4]. 
So, I think 
   `storages[4].setRemainingForTests(100 * 1024 * 1024);` seems useless.  If we 
want to make datanodes[5]'s total remaining largest, we could set 
"storages[5]-extra".  What's your opinions?





> Some statements in testChooseReplicaToDelete method seems useless
> -----------------------------------------------------------------
>
>                 Key: HDFS-17058
>                 URL: https://issues.apache.org/jira/browse/HDFS-17058
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: farmmamba
>            Assignee: farmmamba
>            Priority: Trivial
>              Labels: pull-request-available
>
> Below snippet seems useless in method testChooseReplicaToDelete().
> We can drop it.
> {code:java}
> storages[4].setRemainingForTests(100 * 1024 * 1024); {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to