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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]