HBase Zookeeper Standalone Construction

Source: Internet
Author: User

One, the ZK alone to build

1. Modify the configuration file: Conf/zoo.cfg

Java code
    1. Ticktime=
    2. Datadir=/home/hadoop/data/zookeeper
    3. clientport=2181
    4. initlimit=5
    5. synclimit=2
    6. Server. 1=slave-:2888:3888
    7. Server. 2=slave-:2888:3888
    8. Server. 3=slave-:2888:3888

2. Generate the myID file

Java code
    1. In the slave-01
    2. echo "1" >/home/hadoop/data/zookeeper/myid
    3. In the slave-02
    4. echo "2" >/home/hadoop/data/zookeeper/myid
    5. In the slave-03
    6. echo "3" >/home/hadoop/data/zookeeper/myid

3. Need to start ZK on each machine

Java code
    1. zkserver.sh start

4. Test ZK

Java code
    1. zkserver.sh status

Second, HBase

1. Modify the Hbase-site.xml configuration file

Java code
  1. <configuration>
  2. <property>
  3. <name>hbase.rootdir</name>
  4. <value>hdfs://slave-1:9000/hbase</value>
  5. </property>
  6. <property>
  7. <name>hbase.cluster.distributed</name>
  8. <value>true</value>
  9. </property>
  10. <property>
  11. <name>hbase.zookeeper.property.clientPort</name>
  12. <value>2181</value>
  13. </property>
  14. <property>
  15. <name>hbase.zookeeper.quorum</name>
  16. <value>slave-01,slave-02,slave-03</value>
  17. </property>
  18. <property>
  19. <name>hbase.zookeeper.property.dataDir</name>
  20. <value>/home/hadoop/temp/zookeeper</value>
  21. </property>
  22. <property>
  23. <name>dfs.support.append</name>
  24. <value>true</value>
  25. </property>
  26. </configuration>

2.hbase-env.sh

Java code
    1. Export JAVA_HOME=/USR/LIB/JAVA/JDK1. installation directory for 6.0_25//JDK
    2. Export hbase_classpath=/home/hadoop/hadoop-1.0. installation directory for 3/conf//hadoop
    3. Export hbase_manages_zk=false

3.regionservers

Java code
    1. slave-
    2. slave-
    3. slave-

HBase Zookeeper Standalone Construction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.