You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by ja...@apache.org on 2013/04/16 20:00:47 UTC

[2/2] git commit: Fix NPE, add runbit script to start up Drilbit.

Fix NPE, add runbit script to start up Drilbit.


Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/f1746c92
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/f1746c92
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/f1746c92

Branch: refs/heads/execwork
Commit: f1746c92ffbd74ef9622af294768372fd1676459
Parents: f3b2019
Author: Jacques Nadeau <ja...@apache.org>
Authored: Tue Apr 16 10:59:49 2013 -0700
Committer: Jacques Nadeau <ja...@apache.org>
Committed: Tue Apr 16 10:59:49 2013 -0700

----------------------------------------------------------------------
 .../apache/drill/exec/service/ServiceEngine.java   |    5 +++--
 .../prototype/exec/java-exec/src/test/sh/runbit    |    9 +++++++++
 2 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/f1746c92/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/service/ServiceEngine.java
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/service/ServiceEngine.java b/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/service/ServiceEngine.java
index 97db72e..5d83bdb 100644
--- a/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/service/ServiceEngine.java
+++ b/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/service/ServiceEngine.java
@@ -43,9 +43,10 @@ public class ServiceEngine implements Closeable{
   DrillbitContext context;
   
   public ServiceEngine(DrillbitContext context){
+    this.context = context;
     ByteBufAllocator allocator = context.getAllocator().getUnderlyingAllocator();
-    userServer = new UserServer(allocator, new NioEventLoopGroup(1, new NamedThreadFactory("UserServer-")), context);
-    bitCom = new BitComImpl(context);
+    this.userServer = new UserServer(allocator, new NioEventLoopGroup(1, new NamedThreadFactory("UserServer-")), context);
+    this.bitCom = new BitComImpl(context);
   }
   
   public void start() throws DrillbitStartupException, InterruptedException{

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/f1746c92/sandbox/prototype/exec/java-exec/src/test/sh/runbit
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/sh/runbit b/sandbox/prototype/exec/java-exec/src/test/sh/runbit
new file mode 100755
index 0000000..10fc1d5
--- /dev/null
+++ b/sandbox/prototype/exec/java-exec/src/test/sh/runbit
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+PROJECT_ROOT=../../../
+
+mvn dependency:build-classpath -f=$PROJECT_ROOT/pom.xml -Dmdep.outputFile=target/sh/cp.txt
+CP=`cat $PROJECT_ROOT/target/sh/cp.txt`
+CP=$CP:$PROJECT_ROOT/target/classes:$PROJECT_ROOT/target/test-classes
+java -cp $CP org.apache.drill.exec.server.Drillbit
+