hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-5710) NPE in MiniCluster during metadata scan for a pre-split table with multiple column families
Date Wed, 04 Apr 2012 01:04:24 GMT
NPE in MiniCluster during metadata scan for a pre-split table with multiple column families
-------------------------------------------------------------------------------------------

                 Key: HBASE-5710
                 URL: https://issues.apache.org/jira/browse/HBASE-5710
             Project: HBase
          Issue Type: Bug
          Components: test, util
    Affects Versions: 0.94.0
         Environment: MiniCluster
            Reporter: James Taylor
            Priority: Minor
             Fix For: 0.94.0


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();
   }




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message