[ 
https://issues.apache.org/jira/browse/HDFS-15810?focusedWorklogId=583166&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-583166
 ]

ASF GitHub Bot logged work on HDFS-15810:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 15/Apr/21 06:26
            Start Date: 15/Apr/21 06:26
    Worklog Time Spent: 10m 
      Work Description: 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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 583166)
    Time Spent: 40m  (was: 0.5h)

> RBF: RBFMetrics's TotalCapacity out of bounds
> ---------------------------------------------
>
>                 Key: HDFS-15810
>                 URL: https://issues.apache.org/jira/browse/HDFS-15810
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Xiaoxing Wei
>            Assignee: Fengnan Li
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: image-2021-02-02-10-59-17-113.png
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> The Long type fields TotalCapacity,UsedCapacity and RemainingCapacity in 
> RBFMetrics maybe ** out of bounds.
> !image-2021-02-02-10-59-17-113.png!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to