You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Carter (JIRA)" <ji...@apache.org> on 2014/08/01 21:37:40 UTC

[jira] [Updated] (HBASE-11068) Update code to use Admin factory method instead of constructor

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

Carter updated HBASE-11068:
---------------------------

    Attachment: HBASE_11068-branch-1-v2.patch

> 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
>         Attachments: HBASE_11068-branch-1-v2.patch, HBASE_11068.patch
>
>
> Where feasible, the code should be updated to use the HConnection factory method for the admin interface.  For instance, the following:
> {code:java}
>     HBaseAdmin admin = new HBaseAdmin(conf);
> {code}
> would be changed to:
> {code:java}
>     Admin admin = HConnectionManager.createConnection(conf).getAdmin();
> {code}
> This would also require updates to admin calls that refer to a tablename as byte[] or String.
> {code:java}
>     admin.enableTable("mytable");
> {code}
> would change to:
> {code:java}
>     admin.enableTable(TableName.valueOf("mytable"));
> {code}



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