hbase搭建

[list]
[*]前置条件
[/list]
hadoop环境运行正常。
[list]
[*]步骤
[/list]
下载hbase压缩包hbase-0.94.2.tar.gz,并解压tar -zxvf *.gz
配置hbase-site.xml
<property>
<name>hbase.rootdir</name>
<value>hdfs://master:8020/hbase</value>
<description>The directory shared by region servers and into
which HBase persists. The URL should be 'fully-qualified'
to include the filesystem scheme. For example, to specify the
HDFS directory '/hbase' where the HDFS instance's namenode is
running at namenode.example.org on port 9000, set this value to:
hdfs://namenode.example.org:9000/hbase. By default HBase writes
into /tmp. Change this configuration else all data will be lost
on machine restart.
</description>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
<description>The mode the cluster will be in. Possible values are
false for standalone mode and true for distributed mode. If
false, startup will run all HBase and ZooKeeper daemons together
in the one JVM.
</description>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>10.200.187.77,10.200.187.78</value>
<description>Comma separated list of servers in the ZooKeeper Quorum.
For example, "host1.mydomain.com,host2.mydomain.com,host3.mydomain.com".
By default this is set to localhost for local and pseudo-distributed modes
of operation. For a fully-distributed setup, this should be set to a full
list of ZooKeeper quorum servers. If HBASE_MANAGES_ZK is set in hbase-env.sh
this is the list of servers which we will start/stop ZooKeeper on.
</description>
</property>

配置hbase-env.sh
export HBASE_OPTS="$HBASE_OPTS -Xgcprio:throughput"
export JAVA_HOME=/home/hadoop/jrockit-jdk1.6.0_29
export HBASE_MANAGES_ZK=true
export HBASE_HOME=/home/hadoop/hbase-0.94.2
export HADOOP_HOME=/home/hadoop/hadoop-1.0.3


由于我们使用jrocekit jdk版本,所有参数类似-Xgcprio:throughput,若我们使用正常jdk版本使用系统默认设置即可。

HBASE_MANAGES_ZK=true表示使用hbase内置zookeeper,即也会使用hbase-site.xml中zoopkeeper的设置,若不使用内置zookeeper,将其设成false,然后安装自己的zookeeper,并启动。
启动hbase
./start-hbase.sh
[list]
[*]遇到问题
[/list]
hbase脚本中-XX:OnOutOfMemoryError="kill -9 %p"参数不识别,因为使用的jrocekit版本,然后使用jrocekit版本的-XXexitOnOutOfMemory同样不行。目前没有解决。

Unknown option or illegal argument: -XXexitOnOutOfMemory.
Please check for incorrect spelling or review documentation of startup options.

Could not create the Java virtual machine.


Unix:
-XX:OnOutOfMemoryError="kill -9 %p"

Windows:
-XX:OnOutOfMemoryError="taskkill /F /PID %p"

JRockIT:
-XXexitOnOutOfMemory

[*]问题解决
Jerockit新版本参数有变动,参考:
http://docs.oracle.com/cd/E15289_01/doc.40/e15062/optionxx.htm#BABCDAIB
JRockIT:
-XX:+ExitOnOutOfMemoryError
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值