0

I have set up Hbase on Pseudo-Distributed mode and have installed Phoenix on it.

I can connect to Phoenix using sqlline.py localhost and can use it without any errors. then I tried to connect to Phoenix through Java by using the following

Connection con = DriverManager.getConnection("jdbc:phoenix:[zookeeper]");

as give on the apache FAQs. then I replaced the [zookeeper] with the ip address of my VM on which hbase and Phoenix is set up, but its not connecting..

my zoo.cfg contains only the basic properties:

tickTime=2000
dataDir=/home/hduser/zookeeper/datadir
clientPort=2181

my regionservers file in hbase/conf has only localhost in it.

What should be the correct URL to connect to hbase?

1 Answers1

1

I just needed to add the machine with zookeeper in etc/hostsas <ipaddress> machine_name and then use the machine name in the url for JDBC connection.