The connection is kept open for the lifetime of the JVM. It's also good to keep HTable's opened, one per thread per table, as the real connections are done in a utility class inside HBaseConnectionManager (which you don't have to worry about).
J-D On Fri, Feb 18, 2011 at 11:06 AM, Nanheng Wu <[email protected]> wrote: > I am using a HBase as backend for a service. I want to somehow cache > the connection to HBase so each request doesn't need to pay the cost > of making the connection. I am already cacheing the HTable object, is > that enough or is there a better way? And how long can the connection > be held onto? Thanks! >
