Be careful/considerate when using autoflush.
The problems with HTable this tries to solve is that HTable:
Note that HTable doesn't represent a connection, but uses a HConnection managed by the HConnectionManager.
The first implementation was based on caching HTable instances in threadlocal variables, now it is based on HTablePool. The reason for changing this was that HTable now contains an ExecutorService instance, which is better exploited if we reduce the number of HTable instances. And now this implementation even changes it by a shared ExecutorService instance, since otherwise still very many very short-lived threads were created. So in fact we could return to the thread-local approach, but maybe that's less efficient when threads are not reused (which would actually be an efficiency problem by itself, so this is maybe not an argument).
|
|
|
|