我在配置和安装 hbase/hadoop/hive 时遇到问题。到目前为止我在 ubuntu 14.04.3 LTS 的虚拟机上做了什么:
https://askubuntu.com/questions/56104/how%E2%80%8B-can-i-install-sun-o%E2%80%8Bracles-proprietary-j%E2%80%8Bava-jdk-6- 7-8-或-jre%E2%80%8B https://askubuntu.com/questions/56104/how%E2%80%8B-can-i-install-sun-o%E2%80%8Bracles-proprietary-j%E2%80%8Bava-jdk-6-7-8-or-jre%E2%80%8B
- Got 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>
- got 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>
- got 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 中可以创建表。我也可以在其中添加一些条目。
在启动配置单元之前,我也在控制台中写了这个
export HADOOP_USER_CLASSPATH_FIRST=true
防止异常
在 Hive 中,可以创建一个表并从中读取内容。但一旦我想按照一些教程中的描述将两者连接在一起
http://chase-seibert.github.io/blog/2013/05/10/hive-hbase-quickstart.html https://chase-seibert.github.io/blog/2013/05/10/hive-hbase-quickstart.html
or http://www.n10k.com/blog/hbase-via-hive-pt1/ http://www.n10k.com/blog/hbase-via-hive-pt1/
I get an Exception. I also described my problem earlier in another post, but this one is much more detailed:
How transfer a Table from HBase to Hive? https://stackoverflow.com/questions/33440186/how-transfer-a-table-from-hbase-to-hive/33445056#comment54833604_33445056