Hexiaoqiao commented on a change in pull request #3320: URL: https://github.com/apache/hadoop/pull/3320#discussion_r695602966
########## File path: hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestBlockStoragePolicy.java ########## @@ -1337,6 +1337,50 @@ public void testChooseSsdOverDisk() throws Exception { Assert.assertEquals(StorageType.DISK, targets[1].getStorageType()); } + @Test Review comment: Add some javadoc here will be more friendly here. ########## File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java ########## @@ -469,7 +469,7 @@ private Node chooseTarget(int numOfReplicas, LOG.trace("storageTypes={}", storageTypes); try { - if ((numOfReplicas = requiredStorageTypes.size()) == 0) { Review comment: Just wonder if this is common bug for every `chooseTarget` invokes when assign `requiredStorageTypes.size()` to `numOfReplicas` here? or just for set storagePolicy? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org