Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Drill, mail # dev - [1/4] git commit: Switch to Optiq 0.7-SNAPSHOT. Add use of FrameworkContext and FrameworkConfig. Move PlannerSettings to FrameworkContext usage model.


Copy link to this message
-
[1/4] git commit: Switch to Optiq 0.7-SNAPSHOT. Add use of FrameworkContext and FrameworkConfig. Move PlannerSettings to FrameworkContext usage model.
jacques@... 2014-04-21, 16:33
Repository: incubator-drill
Updated Branches:
  refs/heads/master a88102bfa -> 84fa4f101
Switch to Optiq 0.7-SNAPSHOT.  Add use of FrameworkContext and FrameworkConfig.  Move PlannerSettings to FrameworkContext usage model.
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/58d33c8a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/58d33c8a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/58d33c8a

Branch: refs/heads/master
Commit: 58d33c8af3e8c4caf5ef0cfc77c8f6f2d88ef1ca
Parents: a88102b
Author: Jacques Nadeau <[EMAIL PROTECTED]>
Authored: Mon Apr 21 09:21:30 2014 -0700
Committer: Jacques Nadeau <[EMAIL PROTECTED]>
Committed: Mon Apr 21 09:22:02 2014 -0700

 .../org/apache/drill/exec/ops/QueryContext.java | 10 +++-
 .../physical/HashToRandomExchangePrel.java      |  2 +-
 .../exec/planner/physical/PlannerSettings.java  | 45 ++++++++++++++++
 .../exec/planner/physical/PlanningSettings.java | 57 --------------------
 .../drill/exec/planner/physical/PrelUtil.java   |  4 ++
 .../physical/SingleMergeExchangePrel.java       |  2 +-
 .../planner/physical/UnionExchangePrel.java     |  2 +-
 .../drill/exec/planner/sql/DrillSqlWorker.java  | 13 ++++-
 .../planner/sql/handlers/DefaultSqlHandler.java |  7 +--
 .../planner/sql/handlers/SetOptionHandler.java  |  2 +-
 .../apache/drill/exec/rpc/user/UserSession.java |  9 ----
 .../java/org/apache/drill/PlanningBase.java     |  3 ++
 pom.xml                                         |  4 +-
 13 files changed, 81 insertions(+), 79 deletions(-)
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/58d33c8a/exec/java-exec/src/main/java/org/apache/drill/exec/ops/QueryContext.java
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/ops/QueryContext.java b/exec/java-exec/src/main/java/org/apache/drill/exec/ops/QueryContext.java
index 17d47aa..d658c13 100644
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/ops/QueryContext.java
@@ -26,6 +26,7 @@ import org.apache.drill.common.config.DrillConfig;
 import org.apache.drill.exec.cache.DistributedCache;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
 import org.apache.drill.exec.planner.PhysicalPlanReader;
+import org.apache.drill.exec.planner.physical.PlannerSettings;
 import org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint;
 import org.apache.drill.exec.proto.UserBitShared.QueryId;
 import org.apache.drill.exec.rpc.control.WorkEventBus;
@@ -34,7 +35,7 @@ import org.apache.drill.exec.rpc.user.UserSession;
 import org.apache.drill.exec.server.DrillbitContext;
 import org.apache.drill.exec.store.StoragePluginRegistry;
 
-public class QueryContext {
+public class QueryContext{
   static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(QueryContext.class);
 
   private final QueryId queryId;
@@ -42,6 +43,7 @@ public class QueryContext {
   private final WorkEventBus workBus;
   private UserSession session;
   public final Multitimer<QuerySetup> timer;
+  private final PlannerSettings plannerSettings;
 
   public QueryContext(UserSession session, QueryId queryId, DrillbitContext drllbitContext) {
     super();
@@ -50,6 +52,11 @@ public class QueryContext {
     this.workBus = drllbitContext.getWorkBus();
     this.session = session;
     this.timer = new Multitimer<>(QuerySetup.class);
+    this.plannerSettings = new PlannerSettings();
+  }
+
+  public PlannerSettings getPlannerSettings(){
+    return plannerSettings;
   }
 
   public UserSession getSession(){
@@ -108,4 +115,5 @@ public class QueryContext {
   public FunctionImplementationRegistry getFunctionRegistry(){
     return drillbitContext.getFunctionImplementationRegistry();
   }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/58d33c8a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/HashToRandomExchangePrel.java
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/HashToRandomExchangePrel.java b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/HashToRandomExchangePrel.java
index 4935e58..e5c9661 100644
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/HashToRandomExchangePrel.java
@@ -62,7 +62,7 @@ public class HashToRandomExchangePrel extends SingleRel implements Prel {
 
     PhysicalOperator childPOP = child.getPhysicalOperator(creator);
 
-    if(PlanningSettings.get(getCluster()).isSingleMode()) return childPOP;
+    if(PrelUtil.getSettings(getCluster()).isSingleMode()) return childPOP;
 
     //Currently, only accepts "NONE". For other, requires SelectionVectorRemover
     childPOP = PrelUtil.removeSvIfRequired(childPOP, SelectionVectorMode.NONE);

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/58d33c8a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/PlannerSettings.java
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/PlannerSettings.java b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/PlannerSettings.java
new file mode 100644
index 0000000..e6e99c0
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/PlannerSettings.java
@@ -0,0 +1,45 @@
+/**
+ * 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.
+