brumi1024 commented on code in PR #5320: URL: https://github.com/apache/hadoop/pull/5320#discussion_r1097291596
########## 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: ########## @@ -723,6 +727,17 @@ public <S extends SchedulableEntity> OrderingPolicy<S> getAppOrderingPolicy( return orderingPolicy; } + public void setOrderingPolicy(String queue, + String appOrderingPolicy, String postfix, boolean value) { + setBoolean(getQueuePrefix(queue) + + "ordering-policy" + DOT + appOrderingPolicy + DOT + postfix, value); + } + + public boolean getOrderingPolicy(String queue, String appOrderingPolicy, String postfix) { + return getBoolean(getQueuePrefix(queue) + + "ordering-policy" + DOT + appOrderingPolicy + DOT + postfix, false); + } Review Comment: Ordering policy is pluggable, meaning that if someone wants to write a custom one they can, and they can use any type of properties under it. Hence I think adding a boolean getter is misleading, we could simply avoid writing getters for these, as they're not too widely used. ########## 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: ########## @@ -723,6 +727,17 @@ public <S extends SchedulableEntity> OrderingPolicy<S> getAppOrderingPolicy( return orderingPolicy; } + public void setOrderingPolicy(String queue, + String appOrderingPolicy, String postfix, boolean value) { + setBoolean(getQueuePrefix(queue) + + "ordering-policy" + DOT + appOrderingPolicy + DOT + postfix, value); + } + + public boolean getOrderingPolicy(String queue, String appOrderingPolicy, String postfix) { + return getBoolean(getQueuePrefix(queue) + + "ordering-policy" + DOT + appOrderingPolicy + DOT + postfix, false); + } Review Comment: Ordering policy is pluggable, meaning that if someone wants to write a custom one they can, and they can use any type of properties under it. Hence I think adding a boolean getter is misleading, we could simply avoid writing getters/setters for these, as they're not too widely used. -- 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: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org