meszibalu opened a new pull request #2709: URL: https://github.com/apache/hbase/pull/2709
* PoolMap does not discard any elements anymore. If an element is put, it always stores it. The reason: it stores expensive resources (rpc connections) which would lead to resource leak if we simple discard it. RpcClients can reference netty ByteBufs which are reference counted. Resource cleanup is done by AbstractRpcClient.cleanupIdleConnections(). * PoolMap does not implement Map interface anymore, so ensuring thread-safety has become easier. Put method is replaced with getOrCreate(). * ThreadLocalPool doesn't use ThreadLocal class anymore. It stores resources on thread basis, but it doesn't remove values when a thread exits. Again, proper cleanup is done by cleanupIdleConnections(). Signed-off-by: Sean Busbey <[email protected]> Signed-off-by: Wellington Chevreuil <[email protected]> ---------------------------------------------------------------- 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: [email protected]
