HBase
  1. HBase
  2. HBASE-4311

HBaseTestingUtility.createMultiRegions generates table that fails in hbck.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      When refactoring TestHBaseFsckRepair to add more hbck test cases, I noticed that HBaseTestingUtility.createMultiRegions uses an existing table with empty region, adds more regions, and then attempts to remove the region. The region remains in meta and is causes hbck to report at inconsistency. Ideally these test table generation utility functions should generate clean tables.

        Issue Links

          Activity

          Jonathan Hsieh created issue -
          Jonathan Hsieh made changes -
          Field Original Value New Value
          Link This issue blocks HBASE-3354 [ HBASE-3354 ]
          Hide
          Jonathan Hsieh added a comment -

          The description is slightly wrong. The entry is removed from meta but it may be assigned and its hdfs hfile stuff is still present which causes hbck to complain.

          Show
          Jonathan Hsieh added a comment - The description is slightly wrong. The entry is removed from meta but it may be assigned and its hdfs hfile stuff is still present which causes hbck to complain.
          Hide
          stack added a comment -

          I agree we should create hbck clean tables.

          FYI, the gymnastics being done in createMultiRegion precedes the createTable that took a list of regions. In other words, I don't think we need do it this way any more. Could just do http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/HBaseAdmin.html#createTable(org.apache.hadoop.hbase.HTableDescriptor, byte[][]) I believe.

          (You might not be able to do the above w/ the createTableWithLegacy calls though)

          Show
          stack added a comment - I agree we should create hbck clean tables. FYI, the gymnastics being done in createMultiRegion precedes the createTable that took a list of regions. In other words, I don't think we need do it this way any more. Could just do http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/HBaseAdmin.html#createTable(org.apache.hadoop.hbase.HTableDescriptor , byte[][]) I believe. (You might not be able to do the above w/ the createTableWithLegacy calls though)
          Hide
          Jonathan Hsieh added a comment -

          Thanks for the pointer, I'll update table creation in HBASE-4313's refactor of hbck tests. The existing version and the current dev version of the hbck tests does a somewhat hacky cleanup to make the table clean before messing it up again.

          Show
          Jonathan Hsieh added a comment - Thanks for the pointer, I'll update table creation in HBASE-4313 's refactor of hbck tests. The existing version and the current dev version of the hbck tests does a somewhat hacky cleanup to make the table clean before messing it up again.
          Hide
          Jonathan Hsieh added a comment -

          Used other mechanisms to create tables for hbck / HBASE-5128. Might be better to create new issue to remove or deprecate these methods (if this hasn't happened yet).

          Show
          Jonathan Hsieh added a comment - Used other mechanisms to create tables for hbck / HBASE-5128 . Might be better to create new issue to remove or deprecate these methods (if this hasn't happened yet).
          Jonathan Hsieh made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Won't Fix [ 2 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          225d 17m 1 Jonathan Hsieh 12/Apr/12 17:49

            People

            • Assignee:
              Jonathan Hsieh
              Reporter:
              Jonathan Hsieh
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development