Examples of enableTable()


Examples of org.apache.hadoop.hbase.client.HBaseAdmin.enableTable()

        LOG.info("Changing regions in table");
        admin.disableTable(table.getTableName());
        byte[][] newStartKeys = generateRandomStartKeys(15);
        util.createMultiRegions(util.getConfiguration(),
            table, FAMILY_NAME, newStartKeys);
        admin.enableTable(table.getTableName());
        while (table.getRegionsInfo().size() != 15 ||
            !admin.isTableAvailable(table.getTableName())) {
          Thread.sleep(1000);
          LOG.info("Waiting for new region assignment to happen");
        }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.enableTable()

      admin.disableTable(TABLE_NAME);
      while (table.getRegionsInfo().size() != 0) {
        Thread.sleep(1000);
        LOG.info("Waiting for table to disable");
      }
      admin.enableTable(TABLE_NAME);
      util.waitTableAvailable(TABLE_NAME, 30000);
     
      assertEquals("Data should remain after reopening of regions",
          tableDigestBefore, util.checksumRows(table));
    } finally {
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.enableTable()

      HTable table = util.createTable(tname, FAMILY_NAME);
      HBaseAdmin admin = new HBaseAdmin(conf);
      admin.disableTable(tname);
      util.createMultiRegions(conf, table, FAMILY_NAME,
          generateRandomStartKeys(5));
      admin.enableTable(tname);
    } else if ("incremental".equals(args[0])) {
      byte[] tname = args[1].getBytes();
      HTable table = new HTable(conf, tname);
      Path outDir = new Path("incremental-out");
      runIncrementalPELoad(conf, table, outDir);
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.enableTable()

          LOG.info("Waiting on table to finish disabling");
        }
        byte[][] newStartKeys = generateRandomStartKeys(15);
        util.createMultiRegions(
            util.getConfiguration(), table, FAMILIES[0], newStartKeys);
        admin.enableTable(table.getTableName());
        while (table.getRegionsInfo().size() != 15 ||
            !admin.isTableAvailable(table.getTableName())) {
          Thread.sleep(200);
          LOG.info("Waiting for new region assignment to happen");
        }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.enableTable()

      admin.disableTable(TABLE_NAME);
      while (!admin.isTableDisabled(TABLE_NAME)) {
        Thread.sleep(200);
        LOG.info("Waiting for table to disable");
      }
      admin.enableTable(TABLE_NAME);
      util.waitTableAvailable(TABLE_NAME, 30000);
      assertEquals("Data should remain after reopening of regions",
          tableDigestBefore, util.checksumRows(table));
    } finally {
      util.shutdownMiniMapReduceCluster();
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.enableTable()

      HTable table = util.createTable(tname, FAMILIES);
      HBaseAdmin admin = new HBaseAdmin(conf);
      admin.disableTable(tname);
      byte[][] startKeys = generateRandomStartKeys(5);
      util.createMultiRegions(conf, table, FAMILIES[0], startKeys);
      admin.enableTable(tname);
    } else if ("incremental".equals(args[0])) {
      byte[] tname = args[1].getBytes();
      HTable table = new HTable(conf, tname);
      Path outDir = new Path("incremental-out");
      runIncrementalPELoad(conf, table, outDir);
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.enableTable()

    assertTrue("Coprocessor should have been called on table disable",
      cp.wasDisableTableCalled());

    // enable
    assertFalse(cp.wasEnableTableCalled());
    admin.enableTable(TEST_TABLE);
    assertTrue(admin.isTableEnabled(TEST_TABLE));
    // preEnableTable can't bypass default action.
    assertTrue("Coprocessor should have been called on table enable",
      cp.wasEnableTableCalled());
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.enableTable()

    assertTrue("Second column family should be modified",
        cp.wasModifyColumnCalled());

    // enable
    assertFalse(cp.wasEnableTableCalled());
    admin.enableTable(TEST_TABLE);
    assertTrue(admin.isTableEnabled(TEST_TABLE));
    assertTrue("Coprocessor should have been called on table enable",
        cp.wasEnableTableCalled());

    // disable again
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.enableTable()

    admin.disableTable(Bytes.toBytes(userTableName));
    ZKAssign.blockUntilNoRIT(zkw);
    regionCount = instance.getTableRegionCount(userTableName);
    Assert.assertEquals(0, regionCount);

    admin.enableTable(userTableName);
    ZKAssign.blockUntilNoRIT(zkw);
    regionCount = instance.getTableRegionCount(userTableName);
    Assert.assertEquals(11, regionCount);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.enableTable()

    admin.createTable(iHtd, split);
    String tableName = "testRoundRobinAssignmentDuringIndexTableEnable";
    String indexTableName =
        "testRoundRobinAssignmentDuringIndexTableEnable" + Constants.INDEX_TABLE_SUFFIX;
    admin.disableTable(tableName);
    admin.enableTable(tableName);
    boolean isRegionColocated = TestUtils.checkForColocation(master, tableName, indexTableName);
    assertTrue("User regions and index regions should colocate.", isRegionColocated);

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.