Host not updated
wuqiaoyan opened this issue · 1 comments
client1 := gohbase.NewClient("bd-hbase-dev05.zeus.lianjia.com")
When executing main.go for the first time, the host configuration is bd-hbase-dev05.zeus.lianjia.com. Later, the host was updated.
client1 := gohbase.NewClient("bd-hbase-dev05.zeus.lianjia.com:2181")
When executing main.go again, the log shows that bd-hbase-dev05.zeus.lianjia.com:16020 is still used。
The log information is as follows
INFO[0000] Creating new client. Host="10.26.40.106:2181" INFO[0000] added new region client client="RegionClient{Addr: bd-hbase-dev05.zeus.lianjia.com:16020}" table not found
Why hasn't the host been updated
Could you please help us resolve this?
Thanks and Regards
The host from the logs added new region client
should come from Zookeeper or from the meta table information.
gohbase.NewClient("bd-hbase-dev05.zeus.lianjia.com")
just use the zkquorum the first time to connect to Zookeeper, and then depending on the requests:
- get
/master
and execute admin operations with the master. - get
/meta-region-server
, connect to the RegionServer hosting the meta table, and scan the meta table to find other regions location and RegionServers address.