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



##########
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/CapacitySchedulerConfigValidator.java
##########
@@ -27,14 +27,26 @@
 import org.slf4j.LoggerFactory;
 
 import java.io.IOException;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.LinkedHashSet;
+import java.util.List;
 import java.util.Set;
 
 public final class CapacitySchedulerConfigValidator {
   private static final Logger LOG = LoggerFactory.getLogger(
           CapacitySchedulerConfigValidator.class);
 
+  private interface QueueChangeValidator {
+    void validate(CSQueue oldQueue, CSQueue newQueue) throws IOException;
+  }
+
+  private static final List<QueueChangeValidator> QUEUE_CHANGE_VALIDATORS = 
Arrays.asList(

Review comment:
       I actually liked the cycle-based solution. What I meant is that you do 
not need to explicitly create new class to implement a functional interface (an 
interface with only one method), but use an existing method or a lambda.




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