hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khorg...@apache.org
Subject svn commit: r1580035 - /hive/trunk/hcatalog/bin/hcat.py
Date Fri, 21 Mar 2014 20:33:13 GMT
Author: khorgath
Date: Fri Mar 21 20:33:12 2014
New Revision: 1580035

URL: http://svn.apache.org/r1580035
Log:
HIVE-6698 : hcat.py script does not correctly load the hbase storage handler jars (Deepesh
Khandelwal via Sushanth Sowmyan)

Modified:
    hive/trunk/hcatalog/bin/hcat.py

Modified: hive/trunk/hcatalog/bin/hcat.py
URL: http://svn.apache.org/viewvc/hive/trunk/hcatalog/bin/hcat.py?rev=1580035&r1=1580034&r2=1580035&view=diff
==============================================================================
--- hive/trunk/hcatalog/bin/hcat.py (original)
+++ hive/trunk/hcatalog/bin/hcat.py Fri Mar 21 20:33:12 2014
@@ -83,7 +83,7 @@ os.environ['HADOOP_CLASSPATH'] += os.pat
 # done adding the hcatalog jar to the hadoop classpath
 
 # adding hbase storage-handler jars
-hbaseStorageJars =  glob.glob(os.path.join(hcatPrefix, 'share', 'hcatalog', 'storage-handlers',
'hbase', 'lib', 'hbase-storage-handler-*.jar'))
+hbaseStorageJars =  glob.glob(os.path.join(hcatPrefix, 'share', 'hcatalog', 'storage-handlers',
'hbase', 'lib', 'hive-hcatalog-hbase-storage-handler-*.jar'))
 if len(hbaseStorageJars) == 1:
   os.environ['HADOOP_CLASSPATH'] += os.pathsep + hbaseStorageJars[0]
 
@@ -95,6 +95,10 @@ os.environ['HADOOP_CLASSPATH'] += os.pat
 hiveJars = os.path.join(os.environ['HIVE_LIB_DIR'], '*')
 os.environ['HADOOP_CLASSPATH'] += os.pathsep + hiveJars
 
+# adding hbase jars in classpath
+if 'HBASE_HOME' in os.environ and os.path.isdir(os.path.join(os.environ['HBASE_HOME'], 'lib')):
+  os.environ['HADOOP_CLASSPATH'] += os.pathsep + os.path.join(os.environ['HBASE_HOME'], 'lib',
'*');
+
 ##### done with addition of jars
 
 



Mime
View raw message