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: [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]