hadoop - 在Hive/HBase集成中出现MR抓取错误

标签 hadoop integration hbase hive hdfs

我正在2个节点的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

配置单元启动时没有错误,我创建了示例表

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");

hive 中的show tables和hbase中的listscan效果很好。
但是当我在 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_HOME / conf / core-site.xml,将dfs.default.name从ip更改为主机名。像这样

<property>
    <name>fs.default.name</name>
    <value>hdfs://hadoop01:54310/</value>   
</property>

确保此属性和hbase-site.xml中的hbase.rootdir属性都使用相同的主机名或ip。

关于hadoop - 在Hive/HBase集成中出现MR抓取错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12381052/

相关文章:

python - 检查用python编写的配置单元udf中的错误

hadoop - phoenix hbase 表预拆分,同一区域有多个拆分点

hadoop - 在MapReduce中使用HBase代替HDFS

java - Apache 凤凰java.lang.OutOfMemoryError : unable to create new native thread

python - numpy 数组元素的累积积分

amazon-web-services - 如何在 intelliJ 中将 AWS 凭证 key 添加到 Hadoop 配置

hadoop - hadoop 中找不到或加载主类错误

php - 生成人口热图 : Mapreduce?

mysql - 如何在mysql中使用联邦服务器实现数据集成?

c++ - Cairo 和 Qt 集成