Hbase access method by non-cluster Client

Source: Internet
Author: User

Operations on hbase are sometimes not in the cluster. That is to say, three hosts A, B, and C need to build hbase. Now, host D is needed to operate hbase.

The client accesses hbase through zookeeper, and zookeeper accesses the IP address through DNS resolution of the host name. You can use host d to operate hbase in the following two steps:

  1. Add the Host Name and IP address of A, B, and C to the client's hosts (Linux is/etc/hosts, Windows is c: \ windows \ system32 \ drivers \ hosts)
  2. Write in the program:
    Conf = hbaseconfiguration. create (); Conf. set ("hbase. zookeeper. quorum "," 192.168.0.180 "); Conf. set ("hbase. zookeeper. property. clientport, 3355 ″);

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.