Hm... confusing,
So here is the code path:
1. Servlet has doPost method
2. HistoryController instantiated during each doPost request.
HistoryController is Logic wrapper around low-level HBase persistence stuff
Each doPost invokes:
final HistoryController getHistoryController(){
return new
Note also that the createConnection part is somewhat expensive (creates a new
thread pool for use with Puts, also does a ZK lookup, etc).If possible create
the connection ahead of time and only get/close an HTable per request/thread.
-- Lars
From: Serega Sheypak serega.shey...@gmail.com
So the idea is
1. instantiate HConnection using HConnectionManager once
2. Create HTable instance for each Servlet.doPost and close after operation
is done.
Is that correct?
Do region locations cached in this case?
Are ZK connections to region/ZK reused?
Can I harm put/get data because of Servlet
On Sat, Dec 13, 2014 at 11:33 AM, Serega Sheypak serega.shey...@gmail.com
wrote:
So the idea is
1. instantiate HConnection using HConnectionManager once
2. Create HTable instance for each Servlet.doPost and close after operation
is done.
Is that correct?
Yes.
Do region locations
Great, I'll refactor the code. and report back
2014-12-13 22:36 GMT+03:00 Stack st...@duboce.net:
On Sat, Dec 13, 2014 at 11:33 AM, Serega Sheypak serega.shey...@gmail.com
wrote:
So the idea is
1. instantiate HConnection using HConnectionManager once
2. Create HTable instance for