hbase配置文档
Hbase配置文档
目录
Hbase配置文档 (1)
1.1. 前言 (2)
1.2. 编辑环境 (2)
1.3. 与hadoop同步版本(这里hadoop版本是1.02,hbase支持1.00) (5)
1.4. 拷贝到各台服务器 (5)
1.5. 启动并测试hbase (5)
1.6. 监控页面 (5)
1.1.前言
此配置文档基于已装hadoop的前提下,因此诸如jdk,hostname设置,机器登入免密码设置将不再重复
jdk的版本1.7.0_03
hadoop的版本1.02
hbase的版本0.92.1 (注:这里的hbase仅支持hadoop1.00的版本,需要复制core jar 包同步,下文会涉及)
安装目录
Hadoop: /usr/local/webserver/hadoop
Hbase:/usr/local/webserver/hbase
1.2.编辑环境
编辑hbase-env.sh
[root@master hbase]# vim conf/hbase-env.sh
# Set environment variables here.
# The java implementation to use. Java 1.6 required.
# export JAVA_HOME=/usr/java/jdk1.6.0/
export JAVA_HOME=/usr/java/jdk1.7.0_03
# Extra Java CLASSPATH elements. Optional.
# export HBASE_CLASSPATH=
# The maximum amount of heap to use, in MB. Default is 1000.
# export HBASE_HEAPSIZE=1000
# Extra Java runtime options.
# Below are what we set by default. May only work with SUN JVM.
# For more on why as well as other possible settings,
# see https://www.360docs.net/doc/487533735.html,/hadoop/PerformanceTuning
export HBASE_OPTS="-XX:+UseConcMarkSweepGC"
#开启zookeeper
export HBASE_MANAGES_ZK=true
# Uncomment below to enable java garbage collection logging in the .out file.
# export HBASE_OPTS="$HBASE_OPTS -verbose:gc -XX:+PrintGCDetails
-XX:+PrintGCDateStamps"
# Uncomment below if you intend to use the EXPERIMENTAL off heap cache.
# export HBASE_OPTS="$HBASE_OPTS -XX:MaxDirectMemorySize="
# Set hbase.offheapcache.percentage in hbase-site.xml to a nonzero value.
# Uncomment and adjust to enable JMX exporting
# See jmxremote.password and jmxremote.access in $JRE_HOME/lib/management to configure remote password access.
# More details at:
https://www.360docs.net/doc/487533735.html,/javase/6/docs/technotes/guides/management/agent.html
#
# export HBASE_JMX_BASE="-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false"
# export HBASE_MASTER_OPTS="$HBASE_JMX_BASE
-Dcom.sun.management.jmxremote.port=10101"
# export HBASE_REGIONSERVER_OPTS="$HBASE_JMX_BASE
-Dcom.sun.management.jmxremote.port=10102"
# export HBASE_THRIFT_OPTS="$HBASE_JMX_BASE
-Dcom.sun.management.jmxremote.port=10103"
# export HBASE_ZOOKEEPER_OPTS="$HBASE_JMX_BASE
-Dcom.sun.management.jmxremote.port=10104"
# File naming hosts on which HRegionServers will run. $HBASE_HOME/conf/regionservers by default.
# export HBASE_REGIONSERVERS=${HBASE_HOME}/conf/regionservers
# Extra ssh options. Empty by default.
# export HBASE_SSH_OPTS="-o ConnectTimeout=1 -o SendEnv=HBASE_CONF_DIR"
# Where log files are stored. $HBASE_HOME/logs by default.
# 设定日志路径
export HBASE_LOG_DIR=/data/hadoop/hbase/logs
# A string representing this instance of hbase. $USER by default.
# export HBASE_IDENT_STRING=$USER
# The scheduling priority for daemon processes. See 'man nice'.
# export HBASE_NICENESS=10
# The directory where pid files are stored. /tmp by default.
# export HBASE_PID_DIR=/var/hadoop/pids
编辑hbase-site.xml
[root@master hbase]#vim conf/hbase-site.xml
1.3.与hadoop同步版本(这里hadoop版本是1.02,hbase支持1.00)
1.4.拷贝到各台服务器
1.5.启动并测试hbase
1.6.监控页面
http://master:60010/master-status
http://master:60030/rs-status
http://master:60010/zk.jsp
http://master:50070的Browse the filesystem会多出个hbase目录
参考博文
https://www.360docs.net/doc/487533735.html,/wp-content/hbase/book.html(盛大员工翻译的hbase官方文档)