drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-7191) RM blobs persistence in Zookeeper for Distributed RM
Date Mon, 13 May 2019 19:03:00 GMT

    [ https://issues.apache.org/jira/browse/DRILL-7191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16838816#comment-16838816

ASF GitHub Bot commented on DRILL-7191:

HanumathRao commented on pull request #1762: [DRILL-7191 / DRILL-7026]: RM state blob persistence
in Zookeeper and Integration of Distributed queue configuration with Planner
URL: https://github.com/apache/drill/pull/1762#discussion_r283490423

 File path: exec/java-exec/src/main/java/org/apache/drill/exec/resourcemgr/rmblobmgr/RMConsistentBlobStoreManager.java
 @@ -0,0 +1,354 @@
+ * 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.rmblobmgr;
+import avro.shaded.com.google.common.annotations.VisibleForTesting;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import org.apache.curator.framework.recipes.locks.InterProcessMutex;
+import org.apache.drill.common.scanner.persistence.ScanResult;
+import org.apache.drill.exec.coord.zk.ZKClusterCoordinator;
+import org.apache.drill.exec.exception.StoreException;
+import org.apache.drill.exec.resourcemgr.NodeResources;
+import org.apache.drill.exec.resourcemgr.NodeResources.NodeResourcesDe;
+import org.apache.drill.exec.resourcemgr.config.QueryQueueConfig;
+import org.apache.drill.exec.resourcemgr.rmblobmgr.exception.LeaderChangeException;
+import org.apache.drill.exec.resourcemgr.rmblobmgr.exception.RMBlobUpdateException;
+import org.apache.drill.exec.resourcemgr.rmblobmgr.exception.ResourceUnavailableException;
+import org.apache.drill.exec.resourcemgr.rmblobmgr.rmblob.ClusterStateBlob;
+import org.apache.drill.exec.resourcemgr.rmblobmgr.rmblob.ForemanQueueUsageBlob;
+import org.apache.drill.exec.resourcemgr.rmblobmgr.rmblob.ForemanResourceUsage;
+import org.apache.drill.exec.resourcemgr.rmblobmgr.rmblob.ForemanResourceUsage.ForemanResourceUsageDe;
+import org.apache.drill.exec.resourcemgr.rmblobmgr.rmblob.QueueLeadershipBlob;
+import org.apache.drill.exec.resourcemgr.rmblobmgr.rmblob.RMStateBlob;
+import org.apache.drill.exec.server.DrillbitContext;
+import org.apache.drill.exec.store.sys.PersistentStoreConfig;
+import org.apache.drill.exec.store.sys.store.ZookeeperTransactionalPersistenceStore;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+ * RM state blobs manager which does all the update to the blobs under a global lock and
in transactional manner.
+ * Since the blobs are updated by multiple Drillbit at same time to maintain the strongly
consistent information in
+ * these blobs it uses a global lock shared across all the Drillbits.
+ */
+public class RMConsistentBlobStoreManager implements RMBlobStoreManager {
+  private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(RMConsistentBlobStoreManager.class);
+  private static final String RM_BLOBS_ROOT = "rm/blobs";
 Review comment:
   do we need to start this path with "/" ?
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.
For queries about this service, please contact Infrastructure at:

> RM blobs persistence in Zookeeper for Distributed RM
> ----------------------------------------------------
>                 Key: DRILL-7191
>                 URL: https://issues.apache.org/jira/browse/DRILL-7191
>             Project: Apache Drill
>          Issue Type: Sub-task
>          Components:  Server, Query Planning &amp; Optimization
>    Affects Versions: 1.17.0
>            Reporter: Hanumath Rao Maduri
>            Assignee: Sorabh Hamirwasia
>            Priority: Major
>             Fix For: 1.17.0
> Changes to support storing UUID for each Drillbit Service Instance locally to be used
by planner and execution layer. This UUID is used to uniquely identify a Drillbit and register
Drillbit information in the RM StateBlobs.
> Introduced a PersistentStore named ZookeeperTransactionalPersistenceStore with Transactional
capabilities using Zookeeper Transactional API’s. This is used for updating RM State blobs
as all the updates need to happen in transactional manner. Added RMStateBlobs definition and
support for serde to Zookeeper.
> Implementation for DistributedRM and its corresponding QueryRM apis and state management.
> Updated the state management of Query in Foreman so that same Foreman object can be submitted
multiple times. Also introduced concept of 2 maps keeping track of waiting and running queries.
These were done to support for async admit protocol which will be needed with Distributed

This message was sent by Atlassian JIRA

View raw message