hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khorg...@apache.org
Subject svn commit: r1470061 - /hive/branches/branch-0.11/hcatalog/bin/hcat
Date Fri, 19 Apr 2013 22:02:24 GMT
Author: khorgath
Date: Fri Apr 19 22:02:23 2013
New Revision: 1470061

URL: http://svn.apache.org/r1470061
Log:
HCATALOG-621 : bin/hcat should include hbase jar and dependencies in the classpath (Nick Dimiduk
via Sushanth Sowmyan)

Modified:
    hive/branches/branch-0.11/hcatalog/bin/hcat

Modified: hive/branches/branch-0.11/hcatalog/bin/hcat
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.11/hcatalog/bin/hcat?rev=1470061&r1=1470060&r2=1470061&view=diff
==============================================================================
--- hive/branches/branch-0.11/hcatalog/bin/hcat (original)
+++ hive/branches/branch-0.11/hcatalog/bin/hcat Fri Apr 19 22:02:23 2013
@@ -119,8 +119,18 @@ done
 # Put external jars, hcat jar, and config file in the classpath
 HADOOP_CLASSPATH=${HADOOP_CLASSPATH}:${HCAT_CLASSPATH}:${HCAT_JAR}:${HIVE_CONF_DIR}
 
-if [ -n "$HBASE_CONF_DIR" ] && [ -d $HBASE_CONF_DIR ]; then
-    HADOOP_CLASSPATH=${HADOOP_CLASSPATH}:${HBASE_CONF_DIR}
+# Look for HBase in a BigTop-compatible way. Avoid thrift version
+# conflict with modern versions of HBase.
+HBASE_HOME=${HBASE_HOME:-"/usr/lib/hbase"}
+HBASE_CONF_DIR=${HBASE_CONF_DIR:-"${HBASE_HOME}/conf"}
+if [ -d ${HBASE_HOME} ] ; then
+   for jar in $(find $HBASE_HOME -name *.jar -not -name thrift\*.jar); do
+      HBASE_CLASSPATH=$HBASE_CLASSPATH:${jar}
+   done
+   export HADOOP_CLASSPATH="${HADOOP_CLASSPATH}:${HBASE_CLASSPATH}"
+fi
+if [ -d $HBASE_CONF_DIR ] ; then
+    HADOOP_CLASSPATH="${HADOOP_CLASSPATH}:${HBASE_CONF_DIR}"
 fi
 
 export HADOOP_CLASSPATH=$HADOOP_CLASSPATH



Mime
View raw message