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/03/04 16:59:36 UTC

[GitHub] [hadoop] ayushtkn commented on a change in pull request #4009: HDFS-16477. [SPS]: Add metric PendingSPSPaths for getting the number of paths to be processed by SPS

ayushtkn commented on a change in pull request #4009:
URL: https://github.com/apache/hadoop/pull/4009#discussion_r819740564



##########
File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/sps/StoragePolicySatisfyManager.java
##########
@@ -292,4 +292,13 @@ public boolean isEnabled() {
   public StoragePolicySatisfierMode getMode() {
     return mode;
   }
+
+  /**
+   * @return the number of paths to be processed by storage policy satisfier.
+   */
+  public int getPendingSPSPaths() {
+    synchronized (pathsToBeTraversed) {
+      return pathsToBeTraversed.size();
+    }

Review comment:
       This is synchronised and will be called a bunch of times. What impact is it going to have on normal SPS performance

##########
File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
##########
@@ -5524,6 +5524,11 @@ public int getBlockCapacity() {
     return blockManager.getCapacity();
   }
 
+  @Metric({"PendingSPSPaths", "The number of paths to be processed by storage policy satisfier"})
+  public int getPendingSPSPaths() {

Review comment:
       Do you not plan to add this method to ``FSNamesystemMBean``?
   if no specific reason, we should add it there, this is quite specific to FSN




-- 
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