Hi, You should not do this, as localhost should resolve to the own host. This is probably some missing property on the clients hbase configuration (make sure you have a proper hbase-site.xml on client's classpath or set configuration programatically). As a start, check if you had set the properties below on your client's hbase config.
<property> <name>hbase.zookeeper.quorum</name> <value>ZK_HOSTS</value> </property> <property> <name>hbase.zookeeper.property.clientPort</name> <value>2181</value> </property> On 29 Sep 2014, at 13:43, SACHINGUPTA <sac...@datametica.com> wrote: > Hello guys > > I am using the hbase java api to connect to hbase remotely, but when I > executed the java code, got |MasterNotRunningException|. When I debugged the > code, I came to know that zookeeper was returning the address of hmaster as > localhost.localdomain, so the client was trying to search for the hmaster > locally. When I changed the |/etc/hosts| file of my local machine from where > i am running the java client as: > > |<ip of the master> localhost.localdomain| > > then it worked fine. > > However, I think that this is not the right way. I think I have to change the > addresses somewhere in the configuration of zookeeper, but I did not get it. > > please help > thanks > > > -- > Thanks > Sachin Gupta >