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


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/validation/IssueOrder.java:
##########
@@ -0,0 +1,201 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.validation;
+
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Map;
+
+import 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.QueuePath;
+import 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.resolver.ResolvedQueueConfig;
+import 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.validation.rules.AllocationRule;
+import 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.validation.rules.CapacityRule;
+import 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.validation.rules.HierarchyRule;
+import 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.validation.rules.LimitRule;
+import 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.validation.rules.NodeLabelRule;
+import 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.validation.rules.PlacementRulesRule;
+import 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.validation.rules.StateRule;
+import 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.validation.rules.StructureRule;
+import 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.validation.rules.ValueRule;
+
+/**
+ * Orders issues the way a refresh evaluates the checks
+ * ({@code inventory-checks.md} section 1.10), so that the first ERROR is the

Review Comment:
   Thanks, that was a reference to a local working document. Removed in the 
review-fix commit; the comment now just describes the order



##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/validation/rules/StateRule.java:
##########
@@ -0,0 +1,138 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.validation.rules;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.yarn.api.records.QueueState;
+import 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.QueuePath;
+import 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.QueueStateHelper;
+import 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.resolver.Resolved;
+import 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.resolver.ResolvedQueueConfig;
+import 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.resolver.ValueSource;
+import 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.validation.ClusterFacts;
+import 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.validation.ValidationContext;
+import 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.validation.ValidationIssue;
+import 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.validation.ValidationIssue.Severity;
+import 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.validation.ValidationRule;
+
+import static 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.resolver.QueueProperties.STATE;
+
+/**
+ * Queue state checks ({@link QueueStateHelper}): the configured state is
+ * RUNNING or STOPPED, a newly parsed RUNNING queue is not under a parent that
+ * is not RUNNING, and a live queue is only activated under a running parent.
+ */
[email protected]
[email protected]
+public final class StateRule implements ValidationRule {
+  /** S01. */

Review Comment:
   Agreed, they were leftovers from a local inventory. I removed the IDs 
everywhere



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