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/07 14:08:31 UTC
[GitHub] [hadoop] tomscut 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
tomscut commented on a change in pull request #4009:
URL: https://github.com/apache/hadoop/pull/4009#discussion_r820737511
##########
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:
Thanks for the comment. As metric, synchronised can be omitted.
--
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