exclude asm and central-logging dependencies from hadoop in mapr profile

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

Branch: refs/heads/master
Commit: 75351dad9c77041b2622a7dc2b901b94373540ea
Parents: 1206bce
Author: Steven Phillips <[email protected]>
Authored: Fri Aug 30 20:06:40 2013 -0700
Committer: Steven Phillips <[email protected]>
Committed: Tue Sep 3 17:34:23 2013 -0700

----------------------------------------------------------------------
 .../prototype/distribution/src/assemble/bin.xml |  4 ++
 .../distribution/src/resources/sqlline          |  7 ++-
 .../distribution/src/resources/submit_plan      | 55 ++++++++++++++++++++
 sandbox/prototype/exec/java-exec/pom.xml        | 15 ++++++
 .../drill/exec/client/QuerySubmitter.java       |  2 +-
 .../exec/store/parquet/ParquetGroupScan.java    |  1 +
 sandbox/prototype/pom.xml                       |  8 +++
 7 files changed, 90 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/75351dad/sandbox/prototype/distribution/src/assemble/bin.xml
----------------------------------------------------------------------
diff --git a/sandbox/prototype/distribution/src/assemble/bin.xml 
b/sandbox/prototype/distribution/src/assemble/bin.xml
index 5276c69..e18d485 100644
--- a/sandbox/prototype/distribution/src/assemble/bin.xml
+++ b/sandbox/prototype/distribution/src/assemble/bin.xml
@@ -66,6 +66,10 @@
       <outputDirectory>bin</outputDirectory>
     </file>
     <file>
+      <source>src/resources/submit_plan</source>
+      <outputDirectory>bin</outputDirectory>
+    </file>
+    <file>
       <source>src/resources/drill-override.conf</source>
       <outputDirectory>conf</outputDirectory>
     </file>

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/75351dad/sandbox/prototype/distribution/src/resources/sqlline
----------------------------------------------------------------------
diff --git a/sandbox/prototype/distribution/src/resources/sqlline 
b/sandbox/prototype/distribution/src/resources/sqlline
index ea05cc8..5d13646 100755
--- a/sandbox/prototype/distribution/src/resources/sqlline
+++ b/sandbox/prototype/distribution/src/resources/sqlline
@@ -40,6 +40,11 @@ if [ $? -ne 0 ]; then
   exit 1
 fi
 
+# get log directory
+if [ "$DRILL_LOG_DIR" = "" ]; then
+  export DRILL_LOG_DIR=/var/log/drill
+fi
+
 
 CP=$DRILL_HOME/jars/*:$CP
 CP=$DRILL_HOME/lib/*:$CP
@@ -47,7 +52,7 @@ CP=$DRILL_HOME/contrib/*:$CP
 
 CP=$DRILL_CONF_DIR:$CP
 
-echo $QUERY
+DRILL_SHELL_JAVA_OPTS="$DRILL_SHELL_JAVA_OPTS 
-Dlog.path=$DRILL_LOG_DIR/sqlline.log"
 
 if [ -n "$QUERY" ]
 then

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/75351dad/sandbox/prototype/distribution/src/resources/submit_plan
----------------------------------------------------------------------
diff --git a/sandbox/prototype/distribution/src/resources/submit_plan 
b/sandbox/prototype/distribution/src/resources/submit_plan
new file mode 100755
index 0000000..6dc313c
--- /dev/null
+++ b/sandbox/prototype/distribution/src/resources/submit_plan
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+ARGS=();
+while [ $# -gt 0 ]
+do
+  case "$1" in
+  -t) shift;
+      TYPE=$1;;
+  -zk) shift;
+      ZK=$1;;
+  -f) shift;
+      FILE=$1;;
+   *) ARGS+=($1);;
+  esac
+  shift
+done
+
+bin=`dirname "${BASH_SOURCE-$0}"`
+bin=`cd "$bin">/dev/null; pwd`
+
+. "$bin"/drill-config.sh
+
+if [ -z $JAVA_HOME ]
+then
+  JAVA=`which java`
+else
+  JAVA=`find $JAVA_HOME -name java`
+fi
+
+if [ -e $JAVA ]; then
+  echo ""
+else
+  echo "Java not found."
+  exit 1
+fi
+
+$JAVA -version 2>&1 | grep "version" | egrep -e "1.7" > /dev/null
+if [ $? -ne 0 ]; then
+  echo "Java 1.7 is required to run Apache Drill."
+  exit 1
+fi
+
+# get log directory
+if [ "$DRILL_LOG_DIR" = "" ]; then
+  export DRILL_LOG_DIR=/var/log/drill
+fi
+
+CP=$DRILL_HOME/jars/*:$CP
+CP=$DRILL_HOME/lib/*:$CP
+
+CP=$DRILL_CONF_DIR:$CP
+
+DRILL_SHELL_JAVA_OPTS="$DRILL_SHELL_JAVA_OPTS 
-Dlog.path=$DRILL_LOG_DIR/submitter.log"
+
+exec $JAVA $DRILL_SHELL_JAVA_OPTS $DRILL_JAVA_OPTS -cp $CP 
org.apache.drill.exec.client.QuerySubmitter $FILE $TYPE $ZK

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/75351dad/sandbox/prototype/exec/java-exec/pom.xml
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/pom.xml 
b/sandbox/prototype/exec/java-exec/pom.xml
index d7df0b8..c3bd24c 100644
--- a/sandbox/prototype/exec/java-exec/pom.xml
+++ b/sandbox/prototype/exec/java-exec/pom.xml
@@ -87,6 +87,16 @@
       <groupId>com.twitter</groupId>
       <artifactId>parquet-hadoop</artifactId>
       <version>1.0.1</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-core</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-client</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>com.yammer.metrics</groupId>
@@ -198,6 +208,11 @@
           <groupId>org.apache.hadoop</groupId>
           <artifactId>hadoop-core</artifactId>
         </dependency>
+        <dependency>
+          <groupId>com.mapr.hadoop</groupId>
+          <artifactId>maprfs</artifactId>
+          <version>1.0.3-mapr-3.0.0</version>
+        </dependency>
       </dependencies>
     </profile>
     <profile>

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/75351dad/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/client/QuerySubmitter.java
----------------------------------------------------------------------
diff --git 
a/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/client/QuerySubmitter.java
 
b/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/client/QuerySubmitter.java
index a9cad92..f74d14b 100644
--- 
a/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/client/QuerySubmitter.java
+++ 
b/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/client/QuerySubmitter.java
@@ -58,7 +58,7 @@ public class QuerySubmitter {
     Stopwatch watch = new Stopwatch();
     watch.start();
     client.runQuery(queryType, plan, listener);
-    System.out.println(String.format("Got %d total records in %d seconds", 
listener.await(), watch.elapsed(TimeUnit.SECONDS)));
+    System.out.println(String.format("Got %d total records in %f seconds", 
listener.await(), (float)watch.elapsed(TimeUnit.MILLISECONDS) / (float)1000));
     return 0;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/75351dad/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
----------------------------------------------------------------------
diff --git 
a/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
 
b/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
index f0f3481..209a620 100644
--- 
a/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
+++ 
b/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
@@ -86,6 +86,7 @@ public class ParquetGroupScan extends AbstractGroupScan {
   private Collection<DrillbitEndpoint> availableEndpoints;
   private ParquetStorageEngine storageEngine;
   private StorageEngineRegistry engineRegistry;
+  @JsonProperty("storageengine")
   private ParquetStorageEngineConfig engineConfig;
   private FileSystem fs;
   private final FieldReference ref;

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/75351dad/sandbox/prototype/pom.xml
----------------------------------------------------------------------
diff --git a/sandbox/prototype/pom.xml b/sandbox/prototype/pom.xml
index ccb8d76..e0d8644 100644
--- a/sandbox/prototype/pom.xml
+++ b/sandbox/prototype/pom.xml
@@ -387,6 +387,14 @@
             <version>1.0.3-mapr-3.0.0</version>
             <exclusions>
               <exclusion>
+                <artifactId>asm</artifactId>
+                <groupId>asm</groupId>
+              </exclusion>
+              <exclusion>
+                <artifactId>central-logging</artifactId>
+                <groupId>com.mapr.util</groupId>
+              </exclusion>
+              <exclusion>
                 <groupId>org.codehaus.jackson</groupId>
                 <artifactId>jackson-core-asl</artifactId>
               </exclusion>

Reply via email to