#hadoop-env.sh 下添加
export HADOOP_CLASSPATH=$HBASE_HOME/hbase-0.90.4.jar:$HBASE_HOME/conf:$HBASE_HOME/lib/zookeeper-3.3.2.jar
#hbase-env.sh 下添加
export HBASE_CLASSPATH=/usr/hadoop-0.20.203.0/conf
将$hbase_home 下hbase*.jar 以及lib目录下zookeeper*.jar 复制到$hadoop_home/lib去
JAVA:
private static Configuration conf= null;
static {
conf = HBaseConfiguration.create();
conf.set("hbase.zookeeper.quorum", "hadoop.org");
}
--------
http://www.spnguru.com/2010/07/hbase-client-api-guide/
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11863799/viewspace-714784/,如需转载,请注明出处,否则将追究法律责任。