Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-11068

Update code to use Admin factory method instead of constructor

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.99.0
    • 0.99.0
    • None
    • None
    • Reviewed

    Description

      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"));
      

      Attachments

        1. HBASE_11068.patch
          157 kB
          Carter
        2. HBASE_11068-branch-1-v2.patch
          213 kB
          Carter

        Issue Links

          Activity

            People

              carterpage Carter
              carterpage Carter
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: