Version 8 (modified by waue, 13 years ago) (diff) |
---|
環境
- hadoop => /opt/hadoop-1.0.0
- workspace => /var/hadoop/hadoop100
- hbase => /opt/hbase-0.90.5
- workspace => /var/hadoop/hbase0905
hadoop 1.0.0 single node
- conf/hadoop-env.sh
export JAVA_HOME=/usr/lib/jvm/java-6-sun
hbase 0.90.5 single node
- conf/hbase-env.sh
export JAVA_HOME=/usr/lib/jvm/java-6-sun
- conf/hbase-site.xml
<configuration> <property> <name>hbase.rootdir</name> <value>file:///var/hadoop/hbase0905</value> </property> </configuration>
bin/start-hbase.sh
eclipse
- 由於 hadoop 與 hbase 的 lib 內有大部分的重複,但其中沒重複到的 library 又很重要,沒引入會出現錯誤。
- 引入 hbase => hbase-core.jar
- 引入 hbase => lib/*.jar
- 移出 hbase => lib/commons-*.jar
- 引入 hadoop=> hadoop-core.jar
- 引入 hadoop=> lib/commons-*.jar (尤其是 commons-configuration-1.6.jar)
- 範例程式: WordCountHBase.java (hadoop -> hbase)
run
- run as java application
Attachments (1)
- hadoop-conf-swith.zip (3.4 KB) - added by waue 13 years ago.
Download all attachments as: .zip