hbase配置

来源:互联网 发布:北京程序员工资 知乎 编辑:程序博客网 时间:2024/04/29 14:29
1、下载hbase
hbase-0.90.3

2、下载zookeeper
zookeeper-3.3.2

版本一定要对应上,同时检查lib里的jar包hbase、zookeeper、hadoop的版本是否对应

3、修改zoo.cfg
修改dataDir=C:/cygwin/home/Administrator/zookeeper-3.3.2/data_dir
增加:server.1=130.51.38.100:2888:3888

4、修改regionservers
meimer-computer

5、配置hbase-site.xml
<configuration>
  <property>
    <name>hbase.rootdir</name>
    <value>hdfs://localhost:9100/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.master.port</name>
    <value>60000</value>
    <description>The port the HBase Master should bind to.</description>
  </property>
  <property>
    <name>hbase.tmp.dir</name>
    <value>/tmp/hbase-${user.name}</value>
    <description>Temporary directory on the local filesystem.
    Change this setting to point to a location more permanent
    than '/tmp' (The '/tmp' directory is often cleared 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>meimer-computer</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>
</configuration>

6、修改hbase-evn.sh
export JAVA_HOME=/usr/local/jdk1.6.0_24
export HBASE_MANAGES_ZK=false

7、启动
bin/kzServer.sh start
bin/start-hbase.sh
bin/hbase shell

如果报java找不到,修改zkServer.sh里的java为全路径

停止
bin/kzServer.sh stop
bin/stop-hbase.sh

0 0
原创粉丝点击