Examples of enableTable()


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

        if (options.getCreateHBaseTable()) {
          // Create the column family.
          LOG.info("Creating missing column family " + familyName);
          admin.disableTable(tableName);
          admin.addColumn(tableName, colDesc);
          admin.enableTable(tableName);
        } else {
          LOG.warn("Could not find column family " + familyName + " in table "
            + tableName);
          LOG.warn("This job may fail. Either create the column family,");
          LOG.warn("or re-run with --hbase-create-table.");
View Full Code Here

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

      catch (TableExistsException e) {
        LOG.info("Tried to create the hash table, but it already exists. Probably just lost a race condition.");
      }
    }
    else if (!admin.isTableEnabled(tname)) {
      admin.enableTable(tname);
    }

    return new HTable(conf, tname);
  }
}
View Full Code Here

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

    cluster.hbaseCluster.getMaster().getServerManager()
      .setMinimumServerCount(2);

    // now try to enable the table
    try {
      admin.enableTable(TABLE_NAME);
    } catch (IOException ex) {
      // ignore
    }
    Thread.sleep(10 * 1000);
    assertFalse(admin.isTableAvailable(TABLE_NAME));
View Full Code Here

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

      } else {
        admin.modifyColumn(tableName, columnDesc);
      }
    }
    LOG.info("Enabling table " + tableName);
    admin.enableTable(tableName);
  }

  @Override
  protected void addOptions() {
    addOptWithArg(OPT_ZK_QUORUM, "ZK quorum as comma-separated host names " +
View Full Code Here

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

      HTableDescriptor htd = admin.getTableDescriptor(table);
      htd.setValue("NOT_DEFAULT", "true");
      admin.disableTable(table);
      admin.modifyTable(table, htd);
      admin.enableTable(table);
      fs.delete(status.getPath(), true);

      // fix OrphanTable with cache
      htd = admin.getTableDescriptor(table); // warms up cached htd on master
      hbck = doFsck(conf, true);
View Full Code Here

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

      createTableDescriptor(fs, FSUtils.getRootDir(TEST_UTIL.getConfiguration()), htd);
    // Assign out the regions we just created.
    HBaseAdmin admin = new HBaseAdmin(TEST_UTIL.getConfiguration());
    MiniHBaseCluster cluster = TEST_UTIL.getMiniHBaseCluster();
    admin.disableTable(TABLENAME);
    admin.enableTable(TABLENAME);
    boolean ready = false;
    while (!ready) {
      ZKAssign.blockUntilNoRIT(zkw);
      // Assert that every regionserver has some regions on it, else invoke the balancer.
      ready = true;
View Full Code Here

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

     
      HTableDescriptor htd = admin.getTableDescriptor(table.getBytes());
      htd.setValue("NOT_DEFAULT", "true");
      admin.disableTable(table);
      admin.modifyTable(table.getBytes(), htd);
      admin.enableTable(table);
      fs.delete(status.getPath(), true);
     
      // fix OrphanTable with cache
      htd = admin.getTableDescriptor(table.getBytes()); // warms up cached htd on master
      hbck = doFsck(conf, true);
View Full Code Here

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

      } else {
        admin.modifyColumn(tableName, columnDesc);
      }
    }
    LOG.info("Enabling table " + Bytes.toString(tableName));
    admin.enableTable(tableName);
  }

  @Override
  protected void addOptions() {
    addOptWithArg(OPT_ZK_QUORUM, "ZK quorum as comma-separated host names " +
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
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.