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

NPE in MiniCluster during metadata scan for a pre-split table with multiple column families

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • 0.94.0
    • None
    • test, util
    • None
    • MiniCluster

    Description

      In the MiniCluster test environment, an NPE occurs while scanning regions
      of a pre-split table with multiple column families. Without this working
      in the test environment, you cannot write unit tests for these types of
      scenarios.

      Add the following to TestMetaScanner to repro:

      @Test
      public void testMultiFamilyMultiRegionMetaScanner() throws Exception {
      LOG.info("Starting testMetaScanner");
      final byte[] TABLENAME = Bytes.toBytes("testMetaScanner");
      final byte[] FAMILY1 = Bytes.toBytes("family1");
      final byte[] FAMILY2 = Bytes.toBytes("family2");
      TEST_UTIL.createTable(TABLENAME, new byte[][]

      {FAMILY1,FAMILY2}

      );
      Configuration conf = TEST_UTIL.getConfiguration();
      HTable table = new HTable(conf, TABLENAME);
      TEST_UTIL.createMultiRegions(conf, table, FAMILY1,
      new byte[][]

      { HConstants.EMPTY_START_ROW, Bytes.toBytes("region_a"), Bytes.toBytes("region_b")}

      );
      TEST_UTIL.createMultiRegions(conf, table, FAMILY2,
      new byte[][]

      { HConstants.EMPTY_START_ROW, Bytes.toBytes("region_a"), Bytes.toBytes("region_b")}

      );
      // Make sure all the regions are deployed
      TEST_UTIL.countRows(table);

      // This fails with an NPE currently
      MetaScanner.allTableRegions(conf, TABLENAME, false).keySet();
      table.close();
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            giacomotaylor James Taylor
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: