You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by aa...@apache.org on 2021/03/16 04:50:54 UTC

[hadoop] branch trunk updated: YARN-10689. Fix the finding bugs in extractFloatValueFromWeightConfig. (#2760)

This is an automated email from the ASF dual-hosted git repository.

aajisaka pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new e9c9854  YARN-10689. Fix the finding bugs in extractFloatValueFromWeightConfig. (#2760)
e9c9854 is described below

commit e9c98548e9e79ebcc627d5ca1797063e134bfeb7
Author: zhuqi <zh...@qiyi.com>
AuthorDate: Tue Mar 16 12:50:29 2021 +0800

    YARN-10689. Fix the finding bugs in extractFloatValueFromWeightConfig. (#2760)
    
    Signed-off-by: Akira Ajisaka <aa...@apache.org>
---
 .../scheduler/capacity/CapacitySchedulerConfiguration.java              | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacitySchedulerConfiguration.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacitySchedulerConfiguration.java
index 5b29060..ce3c0cb 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacitySchedulerConfiguration.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacitySchedulerConfiguration.java
@@ -775,7 +775,7 @@ public class CapacitySchedulerConfiguration extends ReservationSchedulerConfigur
     if (!configuredWeightAsCapacity(configureValue)) {
       return -1f;
     } else {
-      return Float.valueOf(
+      return Float.parseFloat(
           configureValue.substring(0, configureValue.indexOf(WEIGHT_SUFFIX)));
     }
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org