[
https://issues.apache.org/jira/browse/HBASE-11825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14131903#comment-14131903
]
stack commented on HBASE-11825:
-------------------------------
I like this cleanup in the new Admin Interface:
- HConnection getConnection();
+ Connection getConnection();
Nit: read over the Connection javadoc -- which is really nice and clean BTW --
because there a few fixes ('names H is' should be 'names H are'... 'an Table'
when should be 'a Table', etc)
Nit: should this be in the Interface?
+ boolean isClosed();
Make close idempotent instead?
Is this right?
+ * From this {@link Connection} {@link Table} implementations are retrieved
+ * with {@link Connection#createTable(byte[])}.
There is no createTable in your nice new Connection Interface?
Refer to your class comment rather than reproduce the below in your javadoc
especially as class comment encourages try/finally and this example is absent
it:
{code}
+ * Connection connection = ConnectionFactory.createConnection(conf);
+ * Table table = connection.getTable("mytable");
+ * table.get(...);
+ * ...
+ * table.close();
+ * connection.close();
{code}
This is good:
+@Deprecated
+public class HConnectionManager extends ConnectionFactory {
I thought HCM was internal-only anyways but yeah, it ugly and I like this
effort to better hide the mess.
Regards the restore of HBaseAdmin, it looks to be in test code only. That is
fine IMO.
[~lhofhansl] I know you are busy but you might take a quick look here given
they seem to address a longtime peeve of yours.
> Create Connection and ConnectionManager
> ---------------------------------------
>
> Key: HBASE-11825
> URL: https://issues.apache.org/jira/browse/HBASE-11825
> Project: HBase
> Issue Type: Improvement
> Reporter: Carter
> Assignee: Solomon Duskis
> Priority: Critical
> Fix For: 2.0.0, 0.99.1
>
> Attachments: HBASE_11825.patch
>
>
> This is further cleanup of the HBase interface for 1.0 after implementing the
> new Table and Admin interfaces. Following Enis's guidelines in HBASE-10602,
> this JIRA will generate a new ConnectionManager to replace HCM and Connection
> to replace HConnection.
> For more detail, this JIRA intends to implement this portion:
> {code}
> interface Connection extends Closeable{
> Table getTable(), and rest of HConnection methods
> getAdmin()
> // no deprecated methods (cache related etc)
> }
> @Deprecated
> interface HConnection extends Connection {
> @Deprecated
> HTableInterface getTable()
> // users are encouraged to use Connection
> }
> class ConnectionManager {
> createConnection(Configuration) // not sure whether we want a static
> factory method to create connections or a ctor
> }
> @Deprecated
> class HCM extends ConnectionManager {
> // users are encouraged to use ConnectionManager
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)