paul-rogers commented on a change in pull request #1652: DRILL-7046: Support 
for loading and parsing new RM config file
URL: https://github.com/apache/drill/pull/1652#discussion_r259596137
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/resourcemgr/ResourcePoolImpl.java
 ##########
 @@ -0,0 +1,273 @@
+/*
+ * 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.drill.exec.resourcemgr;
+
+import com.typesafe.config.Config;
+import org.apache.drill.exec.ops.QueryContext;
+import org.apache.drill.exec.resourcemgr.exception.RMConfigException;
+import org.apache.drill.exec.resourcemgr.selectors.DefaultSelector;
+import org.apache.drill.exec.resourcemgr.selectors.ResourcePoolSelector;
+import org.apache.drill.exec.resourcemgr.selectors.ResourcePoolSelectorFactory;
+import org.apache.drill.shaded.guava.com.google.common.base.Preconditions;
+import org.apache.drill.shaded.guava.com.google.common.collect.Lists;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Parses and initializes all the provided configuration for a ResourcePool 
defined in RM configuration. It takes
+ * care of creating all the child ResourcePools belonging to this Resource 
Pool, {@link ResourcePoolSelector} for this
+ * pool and a {@link QueryQueueConfig} if it's a leaf pool.
+ */
+public class ResourcePoolImpl implements ResourcePool {
+  private static final org.slf4j.Logger logger = 
org.slf4j.LoggerFactory.getLogger(ResourcePoolImpl.class);
+
+  private String poolName;
+
+  private List<ResourcePool> childPools;
+
+  private double parentResourceShare;
+
+  private double poolResourceShare;
+
+  private QueryQueueConfig assignedQueue;
+
+  private ResourcePoolSelector assignedSelector;
+
+  private NodeResources poolResourcePerNode;
+
+  private ResourcePool parentPool;
+
+  public static final String POOL_NAME_KEY = "pool_name";
 
 Review comment:
   Nit: constants usually go before non-static members.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to