mmiklavc commented on issue #1483: METRON-2217 Migrate current HBase client 
from HTableInterface to Table
URL: https://github.com/apache/metron/pull/1483#issuecomment-523588870
 
 
   > Hbaseconnections are thread-safe objects. Setting up a HBaseConnection is 
pretty resource intensive. If you are authenticating with a static identity 
that is not going to change (i.e. a service account), and you are constantly 
interacting with HBase, then I believe it is recommended that you keep the 
HBaseConnection object around in a cache or context, and reuse it to pull out 
Table and Mutation objects.
   
   Yes, that is what we're doing here. The connection model differs subtly from 
a standard request/response lifecycle web app in that we don't need to 
open/close the connections. They are bound to the process on startup for the 
duration of the program's execution. There should be no instance where we are 
left with a leaked connection because we're only opening a new one when the 
given thread does not already have an open connection. This generally only 
happens during application initialization/startup for us.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to