hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HBASE-9117) Remove HTablePool and all HConnection pooling related APIs
Date Wed, 26 Nov 2014 18:49:13 GMT

     [ https://issues.apache.org/jira/browse/HBASE-9117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

stack resolved HBASE-9117.
--------------------------
       Resolution: Fixed
    Fix Version/s: 2.0.0

I am resolving this issue as done [~ndimiduk]. Hopefully you are good with that.  Reopen if
I have missed a detail but going over your patch and the above comments, I think we got the
bulk covered.

On your task list in particular:

There is HBASE-12585, the doc, that has to be done still in a thorough manner but that should
not get in the way of our resovling this (some doc has been applied to match then new mode
-- see linked doc JIRA HBASE-12400).

Task 1 'warn on connection cache hit (configurable, off by default. 0.98)' in your list https://issues.apache.org/jira/browse/HBASE-9117?focusedCommentId=13919716&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13919716
would be easy, see patch below, but I think we are just going to piss folks off if we add
a log every time a managed connection is made use of so I don't think we should do it; let
the doc and deprecated API be sufficient.

Task 2. 'deprecate all public HTable constructors (0.98)', from your list is done in 0.99.
All but a constructor used internally marked InterfaceAudience Private have been deprecated.
 Ditto for HBaseAdmin.

On Task 3. 'deprecate ConnectionManager#{delete,get}Connection (0.98)', has been done. There
is no use of deleteConnection internally at least; all usage has been purged but for tests
that verify 'managed' connections continue to work.

Task 4 and 5 were done as subtasks of this one.

Task 6, 'delete all public HTable constructors (0.99)', and task 7, '', are for post 1.0.
They are a load of work converting all tests to use new API.  I filed HBASE-12586 for these.
They are not needed for 1.0 so have not made this new issue a subtask.



More on task 1., I added below patch and then ran TestFromClientSide... there are many, many
instances of the message in the logs:

{code}
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java
index 9d38549..b06f1e6 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java
@@ -284,6 +284,11 @@ class ConnectionManager {
         ConnectionManager.deleteConnection(connectionKey, true);
         connection = (HConnectionImplementation)createConnection(conf, true);
         CONNECTION_INSTANCES.put(connectionKey, connection);
+      } else {
+        LOG.warn("\"Managed\" connections are deprecated. Create and manage your own " +
+          "Connection instance explicitly. See " +
+          "http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/package-summary.html#client_example
" +
+          "for guidance");
       }
       connection.incCount();
       return connection;
{code}

{code}
257 2014-11-26 10:15:42,357 WARN  [main] client.ConnectionManager(288): "Managed" connections
are deprecated. Create and manage your own Connection instance explicitly. See http://hbase.apache.org/apidocs
   /org/apache/hadoop/hbase/client/package-summary.html#client_example for guidance
{code}





> Remove HTablePool and all HConnection pooling related APIs
> ----------------------------------------------------------
>
>                 Key: HBASE-9117
>                 URL: https://issues.apache.org/jira/browse/HBASE-9117
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Lars Hofhansl
>            Assignee: Nick Dimiduk
>            Priority: Critical
>             Fix For: 2.0.0, 0.99.2
>
>         Attachments: HBASE-9117.00.patch, HBASE-9117.01.patch, HBASE-9117.02.patch, HBASE-9117.03.patch,
HBASE-9117.04.patch, HBASE-9117.05.patch, HBASE-9117.06.patch
>
>
> The recommended way is now:
> # Create an HConnection: HConnectionManager.createConnection(...)
> # Create a light HTable: HConnection.getTable(...)
> # table.close()
> # connection.close()
> All other API and pooling will be removed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message