hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sleimanjneidi <jneidi.slei...@gmail.com>
Subject managing HConnection
Date Tue, 03 Feb 2015 14:47:29 GMT
Hi all,
I am using hbase-0.98.1-cdh5.1.4 client and I am a bit confused by the documentation of HConnection.
The document says the following:

HConnection instances can be shared. Sharing is usually what you want because rather than
each HConnection instance having to do its own discovery of regions out on the cluster, instead,
all clients get to share the one cache of locations. HConnectionManager does the sharing for
you if you go by it getting connections. Sharing makes cleanup of HConnections awkward. .

So now I have a simple question: Can I share the same HConnection instance in my entire application?
And write some magic code to know when to close or never close at all?
Or I have to create an instance and close it every time I do a CRUD operation ?

Many thanks

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message