【发布时间】:2015-11-05 12:08:41
【问题描述】:
我在配置和安装 hbase/hadoop/hive 时遇到问题。到目前为止,我在带有 ubuntu 14.04.3 LTS 的虚拟机上做了什么:
- 像这样使用版本jdk1.8.0_60安装jdk:
- 得到 hadoop-2.6.1 并解压 .tar 文件。之后我做了一些配置:
核心站点.xml:
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
hadoop-env.sh
export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_60
hdfs-site.xml
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:///home/hfu/hadoop/hdfs/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:///home/hfu/hadoop/hdfs/datanode</value>
</property>
</configuration>
- 得到hbase-0.98.0-hadoop2并解压并配置如下:
hbase-env.sh
导出 JAVA_HOME=/usr/lib/jvm/jdk1.8.0_60/
hbase-site.xml
<configuration>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.rootdir</name>
<value>file:///home/hfu/hbase-0.98.0-hadoop2/data</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/hfu/hbase-0.98.0-hadoop2/zookeeper</value>
</property>
<property>
<name>zookeeper.znode.parent</name>
<value>/hbase-unsecure</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>ubuntu</value>
</property>
<property>
<name>hbase.master</name>
<value>ubuntu:16000</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
</configuration>
- 得到 apache-hive-1.2.1-bin 并解压:
hive-enf.sh
export HADOOP_HOME=/home/hfu/hadoop-2.6.1
启动 hadoop:
sbin/start-all.sh
启动 hbase:
bin/start-hbase.sh
在 HBASE shell 中创建表是可能的。我也可以在其中添加一些条目。 在我启动 hive 之前,我也在控制台中写了这个
export HADOOP_USER_CLASSPATH_FIRST=true
防止异常
在 Hive 中,可以创建一个表并从中读取内容。但是只要我想按照一些教程中的描述将两者连接在一起
http://chase-seibert.github.io/blog/2013/05/10/hive-hbase-quickstart.html
或http://www.n10k.com/blog/hbase-via-hive-pt1/
我得到一个例外。我之前在另一篇文章中也描述了我的问题,但这篇文章更详细: How transfer a Table from HBase to Hive?
【问题讨论】: