HTable or HConnectionManager, how a client connect to HBase?

2015-02-14 Thread Liu, Ming (HPIT-GADSC)
Hi, I am using HBase 0.98.6. I learned from this maillist before, that the recommended method to 'connect' to HBase from client is to use HConnectionManager like this: HConnection con=HConnectionManager.createConnection(configuration);

RE: HTable or HConnectionManager, how a client connect to HBase?

2015-02-16 Thread Liu, Ming (HPIT-GADSC)
s a good abstraction to control the life cycle of a connection. I seem to understand now :-) Thanks, Ming -Original Message- From: Liu, Ming (HPIT-GADSC) Sent: Saturday, February 14, 2015 10:45 PM To: user@hbase.apache.org Subject: HTable or HConnectionManager, how a client connect to

Re: HTable or HConnectionManager, how a client connect to HBase?

2015-02-17 Thread Enis Söztutar
Hi, You are right that the constructor new HTable(Configuration, ..) will share the underlying connection if same configuration object is used. Connection is a heavy weight object, that holds the zookeeper connection, rpc client, socket connections to multiple region servers, master, and the threa

Re: HTable or HConnectionManager, how a client connect to HBase?

2015-02-17 Thread Serega Sheypak
Hi, Enis Söztutar You've wrote: >>You are right that the constructor new HTable(Configuration, ..) will share the underlying connection if same configuration object is used. What do it mean "the same"? is equality checked using reference (java == ) or using equals(Object other) method? 2015-02-1

Re: HTable or HConnectionManager, how a client connect to HBase?

2015-02-18 Thread Enis Söztutar
It is a bit more complex than that. It is actually a hash of some subset of the configuration properties. See HConnectionKey class if you want to learn more. But the important thing is that with the new style, you do not need to worry anything about these since there is no implicit connection shari

RE: HTable or HConnectionManager, how a client connect to HBase?

2015-02-23 Thread Liu, Ming (HPIT-GADSC)
Thanks, Enis, Your reply is very clear, I finally understand it now. Best Regards, Ming -Original Message- From: Enis Söztutar [mailto:enis@gmail.com] Sent: Thursday, February 19, 2015 10:41 AM To: hbase-user Subject: Re: HTable or HConnectionManager, how a client connect to HBase