brumi1024 commented on code in PR #5320:
URL: https://github.com/apache/hadoop/pull/5320#discussion_r1270365720


##########
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:
##########
@@ -1816,29 +1846,48 @@ public static boolean shouldAppFailFast(Configuration 
conf) {
     return conf.getBoolean(APP_FAIL_FAST, DEFAULT_APP_FAIL_FAST);
   }
 
-  public Integer getMaxParallelAppsForQueue(String queue) {
-    int defaultMaxParallelAppsForQueue =
-        getInt(PREFIX + MAX_PARALLEL_APPLICATIONS,
+  public void setDefaultMaxParallelAppsPerQueue(String value) {

Review Comment:
   The naming is misleading, I would simply use setDefaultMaxParallelApps as 
there is a queue based MaxParallelApps setting.
   Also same as with the maximumAllocation properties: this should get an int 
parameter and use setInt.



##########
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:
##########
@@ -501,8 +501,12 @@ public int getMaximumSystemApplications() {
     return maxApplications;
   }
 
+  public void setMaximumApplicationMasterResourcePercent(float percent) {
+    setFloat(PREFIX + MAXIMUM_AM_RESOURCE_SUFFIX, percent);
+  }
+
   public float getMaximumApplicationMasterResourcePercent() {
-    return getFloat(MAXIMUM_APPLICATION_MASTERS_RESOURCE_PERCENT,
+    return getFloat(PREFIX + MAXIMUM_AM_RESOURCE_SUFFIX,

Review Comment:
   Is this change needed? If MAXIMUM_APPLICATION_MASTERS_RESOURCE_PERCENT 
exists (and has quite a few uses in tests) why not use it?



##########
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:
##########
@@ -1816,29 +1846,48 @@ public static boolean shouldAppFailFast(Configuration 
conf) {
     return conf.getBoolean(APP_FAIL_FAST, DEFAULT_APP_FAIL_FAST);
   }
 
-  public Integer getMaxParallelAppsForQueue(String queue) {
-    int defaultMaxParallelAppsForQueue =
-        getInt(PREFIX + MAX_PARALLEL_APPLICATIONS,
+  public void setDefaultMaxParallelAppsPerQueue(String value) {
+    set(PREFIX + MAX_PARALLEL_APPLICATIONS, value);
+  }
+
+  public Integer getDefaultMaxParallelAppsPerQueue() {

Review Comment:
   Same as above, getDefaultMaxParallelApps.



##########
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:
##########
@@ -1222,6 +1226,16 @@ public void reinitializeConfigurationProperties() {
     configurationProperties = new ConfigurationProperties(props);
   }
 
+  public void setQueueMaximumAllocationMb(String queue, String value) {
+    String queuePrefix = getQueuePrefix(queue);
+    set(queuePrefix + MAXIMUM_ALLOCATION_MB, value);

Review Comment:
   If the getter returns an int the setter should accept an int. I would use 
int value parameter and setInt method. Same for below.



##########
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:
##########
@@ -1816,29 +1846,48 @@ public static boolean shouldAppFailFast(Configuration 
conf) {
     return conf.getBoolean(APP_FAIL_FAST, DEFAULT_APP_FAIL_FAST);
   }
 
-  public Integer getMaxParallelAppsForQueue(String queue) {
-    int defaultMaxParallelAppsForQueue =
-        getInt(PREFIX + MAX_PARALLEL_APPLICATIONS,
+  public void setDefaultMaxParallelAppsPerQueue(String value) {
+    set(PREFIX + MAX_PARALLEL_APPLICATIONS, value);
+  }
+
+  public Integer getDefaultMaxParallelAppsPerQueue() {
+    return getInt(PREFIX + MAX_PARALLEL_APPLICATIONS,
         DEFAULT_MAX_PARALLEL_APPLICATIONS);
+  }
 
-    String maxParallelAppsForQueue = get(getQueuePrefix(queue)
-        + MAX_PARALLEL_APPLICATIONS);
+  public void setDefaultMaxParallelAppsPerUser(String value) {

Review Comment:
   setInt, and int parameter.



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