搜档网
当前位置:搜档网 › 配置文件内容

配置文件内容

单机模式 部署
创建目录
sudo mkdir /opt/hbase/logs
sudo chown hbase:hadoop /opt/hbase/logs
1 解压后 进入 hbase-1.1.5/conf 目录 修改 hbase-env.sh
修改第一行,加入第二行
export JAVA_HOME=/home/hadoop/jdk1.7.0_79
export HBASE_MANAGES_ZK=true
export HBASE_LOG_DIR=/opt/hbase/logs



2 修改 hbase-1.1.5/conf/hbase-site.xml
加入以下内容


hbase.rootdir
file:///home/testuser/hbase


hbase.zookeeper.property.dataDir
/home/testuser/zookeeper


hbase.unsafe.stream.capability.enforce
false

Controls whether HBase will check for stream capabilities (hflush/hsync).

Disable this if you intend to run on LocalFileSystem, denoted by a rootdir
with the 'file://' scheme, but be mindful of the NOTE below.

WARNING: Setting this to false blinds you to potential data loss and
inconsistent system state in the event of process and/or node failures. If
HBase is complaining of an inability to use hsync or hflush it's most
likely not a false positive.








全分布式 部署
创建目录
sudo mkdir /opt/hbase/logs
sudo chown hbase:hadoop /opt/hbase/logs
1 解压后 进入 hbase-2.0.1/conf 目录 修改 hbase-env.sh
修改第一行,加入第二 三行
export JAVA_HOME=/opt/jdk
export HBASE_MANAGES_ZK=false
export HBASE_LOG_DIR=/opt/hbase/logs
export HBASE_PID_DIR=/home/hbase/pids

2 修改 hbase-2.0.1/conf/hbase-site.xml
加入以下内容


hbase.rootdir
hdfs://master:9000/hbase



hbase.cluster.distributed
true



https://www.sodocs.net/doc/5718922701.html,.port
16010



https://www.sodocs.net/doc/5718922701.html,.port
16030



hbase.zookeeper.quorum
master:2181,slave1:2181,slave2:2181




hbase.zookeeper.property.dataDir
/home/hbase/zk_data



3 修改conf下的regionservers文件加入regoinserver的ip
slave1
slave2

4 保证集群中所有的机器时间相同

5 在hdfs中创建 /hbase目录
使用hdfs用户
hdfs dfs -mkdir /hbase
hdfs

dfs -chown hbase:supergroup /hbase

相关主题