【发布时间】:2012-09-13 17:37:52
【问题描述】:
我在 2-node-hadoop 上运行 hive 和 hbase。 我正在使用 hadoop-0.20.205.0、hive-0.9.0、hbase-0.92.0 和 zookeeper-3.4.2。
hive 和 hbase 分别工作正常。然后我按照这个手册集成了hive和hbase。 https://cwiki.apache.org/confluence/display/Hive/HBaseIntegration
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");
show tables 在 hive 和 list 或 scan 在 hbase 运行良好。
但是当我在 hive 中 select * from hbase_table_1; 时,我得到了错误
2012-09-12 11:25:56,975 ERROR ql.Driver (SessionState.java:printError(400)) - FAILED: Hive Internal Error: java.lang.RuntimeException(Error while making MR scratch directory - check filesystem config (null))
java.lang.RuntimeException: Error while making MR scratch directory - check filesystem config (null)
...
Caused by: java.lang.IllegalArgumentException: Wrong FS: hdfs://10.10.10.15:54310/tmp/hive-hadoop/hive_2012-09-12_11-25-56_602_1946700606338541381, expected: hdfs://hadoop01:54310
说fs是错误的,但是我觉得把fs配置到这样的路径是不对的,应该在哪里配置呢?
这是我的配置文件。 hadoop01的ip地址是10.10.10.15。
hbase-site.xml
<configuration>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2222</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>10.10.10.15</value>
<description>The directory shared by RegionServers.
</description>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/hadoop/datas/zookeeper</value>
<description>Property from ZooKeeper's config zoo.cfg.
The directory where the snapshot is stored.
</description>
</property>
<property>
<name>hbase.rootdir</name>
<value>hdfs://hadoop01:54310/hbase</value>
<description>The directory shared by RegionServers.
</description>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
<description>The mode the cluster will be in. Possible values are
false: standalone and pseudo-distributed setups with managed Zookeeper
true: fully-distributed with unmanaged Zookeeper Quorum (see hbase-env.sh)
</description>
</property>
有人可以帮忙吗?
【问题讨论】:
标签: hadoop integration hbase hive hdfs