You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/04/06 01:44:14 UTC

[GitHub] [hadoop] tasanuma commented on a diff in pull request #4069: HDFS-16457.Make fs.getspaceused.classname reconfigurable

tasanuma commented on code in PR #4069:
URL: https://github.com/apache/hadoop/pull/4069#discussion_r843391276


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java:
##########
@@ -891,13 +896,25 @@ private String reconfDfsUsageParameters(String property, String newVal)
         for (FsVolumeImpl fsVolume : volumeList) {
           Map<String, BlockPoolSlice> blockPoolSlices = fsVolume.getBlockPoolSlices();
           for (BlockPoolSlice value : blockPoolSlices.values()) {
-            value.updateDfsUsageConfig(null, jitter);
+            value.updateDfsUsageConfig(null, jitter, null);
+          }
+        }
+      } else if (property.equals(FS_GETSPACEUSED_CLASSNAME)) {
+        Preconditions.checkNotNull(data, "FsDatasetSpi has not been initialized.");
+        Class<? extends GetSpaceUsed> klass = (newVal == null ? DU.class :
+                Class.forName(newVal).asSubclass(GetSpaceUsed.class));

Review Comment:
   @singer-bin Thanks for updating the PR.
   We may need to use `WindowsGetSpaceUsed.class` if it is windows os.
   https://github.com/apache/hadoop/blob/4ef1d3eef9340b59f132421fba443dc456671ee4/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/GetSpaceUsed.java#L79-L83



-- 
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-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org