Hi to all,

I'm working on a program that is trying to connect to HBase cluster via
ssh tunneling feature. Basically, the cluster is set behind single
entry point (one machine protected with firewall from outside access)
and only ssh port allowed.

ssh tunneling is done like this:

ssh u...@host -L 60000:hmaster:60000 -L 2181:hmaster:2181 -N

which basically means to start listening on 60000 and 2181 ports
(HMaster and ZK ports) and forward secured connection to HOST as 'user',
from where it is tunneled to 'hmaster' where HMaster and Zookeeper are
running.

>From application, I'm making connection like this:

 HBaseConfiguration conf = new HBaseConfiguration();
 conf.set("hbase.master", "localhost");
 conf.set("hbase.zookeeper.quorum", "localhost");

 HBaseAdmin admin = new HBaseAdmin(conf);

>From here, connection to Zookeeper is made successfully, but connection
to HMaster is not, as code will try to use HMaster address fetched from
Zookeeper, which is 'hmaster' in this case, the name not visible and not
accessible outside cluster entry point.

Does anyone knows (or maybe had a similar case) how to manually set
HMaster address, but keep connection to Zookeeper, as (seems to me)
'hbase.master' value is ignored somehow?

Thanks.
Sanel

Reply via email to