Added 'extlib' folder which will contain 3rd party jars which override jars 
from other (Hadoop, HBase) projects.


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

Branch: refs/heads/master
Commit: 292c2d1487f5bcadef62ce4a6f0ddfb5e0b7f128
Parents: 4eea03a
Author: Aditya Kishore <[email protected]>
Authored: Sat Jun 7 13:01:38 2014 -0700
Committer: Jacques Nadeau <[email protected]>
Committed: Sun Jun 8 19:13:06 2014 -0700

----------------------------------------------------------------------
 distribution/src/assemble/bin.xml          | 41 ++++++++++++++--------
 distribution/src/resources/drill-config.sh | 46 +++++++++++++++++++------
 2 files changed, 63 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/292c2d14/distribution/src/assemble/bin.xml
----------------------------------------------------------------------
diff --git a/distribution/src/assemble/bin.xml 
b/distribution/src/assemble/bin.xml
index b0a07df..9d0701f 100644
--- a/distribution/src/assemble/bin.xml
+++ b/distribution/src/assemble/bin.xml
@@ -29,8 +29,8 @@
 
   </moduleSets>
   <dependencySets>
-<!--    <dependencySet>
-
+<!--
+    <dependencySet>
       <includes>
         <include>org.apache.drill.exec:drill-jdbc-all:jar</include>
       </includes>
@@ -39,7 +39,7 @@
     </dependencySet>
 -->
     <dependencySet>
-<!--       Now, select which projects to include in this module-set. -->
+      <!-- Now, select which projects to include in this module-set. -->
       <includes>
         <include>org.apache.drill.exec:drill-jdbc:jar</include>
         <include>org.apache.drill.exec:drill-buffers</include>
@@ -50,25 +50,37 @@
         <include>org.apache.drill.contrib.data:tpch-sample-data:jar</include>
         <include>org.apache.drill.contrib:drill-storage-hbase</include>
       </includes>
-      
-      
-      
       <outputDirectory>jars</outputDirectory>
       <useProjectArtifact>false</useProjectArtifact>
     </dependencySet>  
+
     <dependencySet>
       <outputDirectory>lib</outputDirectory>
       <unpack>false</unpack>
       <useProjectArtifact>false</useProjectArtifact>
       <excludes>
+        <exclude>org.apache.zookeeper</exclude>
         <exclude>org.apache.drill</exclude>
         <exclude>org.apache.drill.exec</exclude>
         <exclude>org.apache.drill.contrib</exclude>
-        <exclude>org.hsqldb:hsqldb</exclude> <!-- exclude or sqlline has 
problems -->
-        <exclude>hsqldb:hsqldb</exclude> <!-- exclude or sqlline has problems 
-->
+        <exclude>org.hsqldb:hsqldb</exclude>
+        <!-- exclude or sqlline has problems -->
+        <exclude>hsqldb:hsqldb</exclude>
+        <!-- exclude or sqlline has problems -->
       </excludes>
       <scope>test</scope>
     </dependencySet>
+
+    <dependencySet>
+      <outputDirectory>extlib</outputDirectory>
+      <unpack>false</unpack>
+      <useProjectArtifact>false</useProjectArtifact>
+      <includes>
+        <include>org.apache.zookeeper:zookeeper</include>
+      </includes>
+      <scope>runtime</scope>
+    </dependencySet>
+
     <dependencySet>
       <outputDirectory>lib</outputDirectory>
       <unpack>false</unpack>
@@ -78,31 +90,32 @@
       </includes>
       <scope>test</scope>
     </dependencySet>
+
   </dependencySets>
-  
+
   <fileSets>
     <fileSet>
       <directory>../sample-data</directory>
       <outputDirectory>sample-data</outputDirectory>
     </fileSet>    
   </fileSets>
-  
+
   <files>
     <file>
       <source>../KEYS</source>
-      <outputDirectory></outputDirectory>
+      <outputDirectory/>
     </file>
     <file>
       <source>../LICENSE</source>
-      <outputDirectory></outputDirectory>
+      <outputDirectory/>
     </file>
     <file>
       <source>../NOTICE</source>
-      <outputDirectory></outputDirectory>
+      <outputDirectory/>
     </file>
     <file>
       <source>target/classes/git.properties</source>
-      <outputDirectory></outputDirectory>
+      <outputDirectory/>
     </file>
     <file>
       <source>src/resources/runbit</source>

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/292c2d14/distribution/src/resources/drill-config.sh
----------------------------------------------------------------------
diff --git a/distribution/src/resources/drill-config.sh 
b/distribution/src/resources/drill-config.sh
index c599a7c..98ae8e5 100644
--- a/distribution/src/resources/drill-config.sh
+++ b/distribution/src/resources/drill-config.sh
@@ -20,11 +20,16 @@
 #
 # Environment Variables:
 #
-#   JAVA_HOME        The java implementation to use.
+#   JAVA_HOME                  The java implementation to use.
 #
-#   DRILL_CLASSPATH  Extra Java CLASSPATH entries.
+#   DRILL_CLASSPATH            Extra Java CLASSPATH entries.
 #
-#   HADOOP_HOME      Hadoop home
+#   DRILL_CLASSPATH_PREFIX     Extra Java CLASSPATH entries that should
+#                              be prefixed to the system classpath.
+#
+#   HADOOP_HOME                Hadoop home
+#
+#   HBASE_HOME                 HBase home
 
 # resolve links - "${BASH_SOURCE-$0}" may be a softlink
 this="${BASH_SOURCE-$0}"
@@ -104,17 +109,38 @@ then
   export HBASE_CLASSPATH=$HBASE_CLASSPATH
 fi
 
-# Setup Drill classpath entries
-CP=$DRILL_HOME/jars/*:$DRILL_CLASSPATH
-CP=$DRILL_HOME/lib/*:$CP
-CP=$DRILL_HOME/contrib/*:$CP
+# Add Drill conf folder at the beginning of the classpath
+CP=$DRILL_CONF_DIR
+
+# Followed by any user specified override jars
+if [ "${DRILL_CLASSPATH_PREFIX}x" != "x" ]; then
+  CP=$CP:$DRILL_CLASSPATH_PREFIX
+fi
+
+# Next Drill core jars
+CP=$CP:$DRILL_HOME/jars/*
+
+# Followed by Drill override dependency jars
+CP=$CP:$DRILL_HOME/extlib/*
+
+# Followed by Hadoop's jar
 if [ "${HADOOP_CLASSPATH}x" != "x" ]; then
-  CP=$HADOOP_CLASSPATH:$CP
+  CP=$CP:$HADOOP_CLASSPATH
 fi
+
+# Followed by HBase' jar
 if [ "${HBASE_CLASSPATH}x" != "x" ]; then
-  CP=$HBASE_CLASSPATH:$CP
+  CP=$CP:$HBASE_CLASSPATH
+fi
+
+# Followed by Drill other dependency jars
+CP=$CP:$DRILL_HOME/lib/*
+CP=$CP:$DRILL_HOME/contrib/*
+
+# Finally any user specified 
+if [ "${DRILL_CLASSPATH}x" != "x" ]; then
+  CP=$CP:$DRILL_CLASSPATH
 fi
-CP=$DRILL_CONF_DIR:$CP
 
 # Newer versions of glibc use an arena memory allocator that causes virtual
 # memory usage to explode. Tune the variable down to prevent vmem explosion.

Reply via email to