aajisaka commented on a change in pull request #2910:
URL: https://github.com/apache/hadoop/pull/2910#discussion_r613788668



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/metrics/RBFMetrics.java
##########
@@ -783,6 +784,23 @@ private long 
getNameserviceAggregatedLong(ToLongFunction<MembershipStats> f) {
     }
   }
 
+  private BigInteger getNameserviceAggregatedBigInt(
+      ToLongFunction<MembershipStats> f) {
+    try {
+      List<MembershipState> states = getActiveNamenodeRegistrations();
+      BigInteger sum = new BigInteger("0");
+      for (MembershipState state : states) {
+        long lvalue = f.applyAsLong(state.getStats());
+        BigInteger bvalue = new BigInteger(String.valueOf(lvalue));

Review comment:
       String is not needed.
   ```suggestion
           BigInteger bvalue = BigInteger.valueOf(lvalue);
   ```
   
   In addition, `new BigInteger("0")` can be replaced with 
`BigInteger.valueOf(0)`.




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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to