Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need help: format of "thehost" #30

Open
hengtelin opened this issue Jun 29, 2016 · 4 comments
Open

need help: format of "thehost" #30

hengtelin opened this issue Jun 29, 2016 · 4 comments

Comments

@hengtelin
Copy link

Hey thank you so much for providing such a good package.
I'm new to Hbase and thus need some help.

If I want to access a remote Hbase, what should I put in the set("spark.hbase.host", "thehost")?
is it similiar to mongodb as 10.200.xx.xxx:27017 (host:port)? Do I need to add computer user name and password?

Thanks in advance!

@hengtelin hengtelin changed the title format of "thehost" need help: format of "thehost" Jun 29, 2016
@nicolaferraro
Copy link
Contributor

Hi, you just need to put the hostname where an instance of zookeeper is listening on port 2181 (omit the port).

If you have docker installed in your workstation, you can try my all-in-one solution for hbase. Just run:

docker run -d -h hbase -p 2181:2181 -p 60000:60000 -p 60010:60010 -p 60020:60020 -p 60030:60030 --name hbase dockmob/hbase -t pseudodistributed

And you create a local instance of hbase (master+regional ever+zookeeper) that you can control later by using: docker start hbase, or docker stop hbase.

To connect to the docker instance, you need to modify your /etc/hosts file to append 'hbase' to the line where '127.0.0.1' is already present (Linux and latest beta versions of docker for Mac and windows) or add a line with the host of boot2docker VM: usually '192.168.99.100 hbase'.

Once set, you can use 'hbase' as "thehost".

@nicolaferraro
Copy link
Contributor

Oh, if you already have a remote instance of hbase, you just need to make sure that you can reach each hbase region server using the internal IP address scheme (I.e. the IP addresses known by zookeeper). Being in the same LAN or VPN does the trick. Once done, just point to the node hosting a zookeeper server.

@hengtelin
Copy link
Author

thank you so much nicolaferraro! You've been really helpful :)

@chetkhatri
Copy link
Contributor

@hengtelin Close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants