hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carter (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-11068) Update code to use Admin factory method instead of constructor
Date Thu, 24 Apr 2014 14:56:16 GMT
Carter created HBASE-11068:
------------------------------

             Summary: Update code to use Admin factory method instead of constructor
                 Key: HBASE-11068
                 URL: https://issues.apache.org/jira/browse/HBASE-11068
             Project: HBase
          Issue Type: Improvement
            Reporter: Carter
            Assignee: Carter


Where feasible, the code should be updated to use the HConnection factory method for the admin
interface.  For instance, the following:

    HBaseAdmin admin = new HBaseAdmin(conf);

would be changed to:

    Admin admin = HConnectionManager.createConnection(conf).getAdmin();

This would also require updates to admin calls that refer to a tablename as byte[] or String.

    admin.enableTable("mytable");

would change to:

    admin.enableTable(TableName.valueOf("mytable"));




--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message