本帖最后由 chengzhb_about 于 2015-8-16 22:42 编辑
请教楼主:
问题1:
hadoop@ubuntu:~$ hive --service metastore
Starting Hive Metastore Server
光标在此处停止。。。。。只显示一行,与楼主的显示明显少很多。
所以我感觉我的hive service没有起来,这是第一个问题。
问题2:
在问题1依然存在的情况下,我换一个终端执行hive,发现在hive下操作hdfs上的文件是没有问题的,如普通的create table,但在hive下想整合hbase时,错误如下:
hive> CREATE TABLE hbase_table_1(key int, value string) STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf1:val") TBLPROPERTIES ("hbase.table.name" = "xyz");
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. org.apache.hadoop.hbase.HTableDescriptor.addFamily(Lorg/apache/hadoop/hbase/HColumnDescriptor;)V
hive>
注:
我的hadoop版本为2.7.1;hbase版本为1.0.1.1;hive版本为1.2.1
我没有安装zookeeper,使用hbase自带的zookeeper,另外我的hive-site.xml如下:
<configuration>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true</value>
<description>JDBC connect string FOR a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
<description>Driver class name FOR a JDBC metastore</description> </property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>hive</value>
<description>username TOUSE against metastore database</description>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>hive</value>
<description>password TOUSE against metastore database</description>
</property>
<property>
<name>hive.metastore.warehouse.dir</name>
<value>hdfs://localhost:9000/hive/warehouse</value>
</property>
<property>
<name>hive.exec.scratchdir</name>
<value>hdfs://localhost:9000/hive/scratchdir</value>
</property>
<property>
<name>hive.querylog.location</name>
<value>/usr/hive/logs</value>
</property>
<property>
<name>hive.aux.jars.path</name>
<value>file:///opt/hive/hive/lib/hive-hbase-handler-1.2.1.jar,file:///opt/hive/hive/lib/protobuf-java-2.5.0.jar,file:///opt/hive/hive/lib/hbase-client-1.0.1.1.jar,file:///opt/hive/hive/lib/hbase-common-1.0.1.1.jar,file:///opt/hive/hive/lib/zookeeper-3.4.6.jar,file:///opt/hive/hive/lib/guava-14.0.1.jar</value>
</property>
</configuration>
上述jar文件都是放在我的/opt/hive/hive/lib下,路径和文件名都检查过没有问题。
|