9uapaw commented on a change in pull request #3470:
URL: https://github.com/apache/hadoop/pull/3470#discussion_r797352770



##########
File path: 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ResourceVector.java
##########
@@ -79,15 +80,24 @@ public static ResourceVector of(Resource resource) {
   }
 
   /**
-   * Subtract values for each resource defined in the given resource vector.
+   * Decrements values for each resource defined in the given resource vector.
    * @param otherResourceVector rhs resource vector of the subtraction
    */
-  public void subtract(ResourceVector otherResourceVector) {
+  public void decrement(ResourceVector otherResourceVector) {
     for (Map.Entry<String, Float> resource : otherResourceVector) {
       setValue(resource.getKey(), getValue(resource.getKey()) - 
resource.getValue());
     }
   }
 
+  /**
+   * Decrements the given resource by the specified value.
+   * @param resourceName name of the resource
+   * @param value value to be subtracted from the resource's current value
+   */
+  public void decrement(String resourceName, float value) {

Review comment:
       Replaced every float with double.




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

Reply via email to