Examples of listTables()


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

    // name "GenericEndpoint" because "C" is before "G" lexicographically.

    HBaseAdmin admin = new HBaseAdmin(this.conf);

    // disable all user tables, if any are loaded.
    for (HTableDescriptor htd: admin.listTables()) {
      if (!htd.isMetaTable()) {
        String tableName = htd.getNameAsString();
        if (admin.isTableEnabled(tableName)) {
          try {
            admin.disableTable(htd.getNameAsString());
View Full Code Here

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

  }

  private final TableListModel getTableList() throws IOException {
    TableListModel tableList = new TableListModel();
    HBaseAdmin admin = new HBaseAdmin(servlet.getConfiguration());
    HTableDescriptor[] list = admin.listTables();
    for (HTableDescriptor htd: list) {
      tableList.add(new TableModel(htd.getNameAsString()));
    }
    return tableList;
  }
View Full Code Here

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

    PrivilegedExceptionAction listTablesAction = new PrivilegedExceptionAction() {
      public Object run() throws Exception {
        HBaseAdmin admin = new HBaseAdmin(TEST_UTIL.getConfiguration());
        try {
          admin.listTables();
        } finally {
          admin.close();
        }
        return null;
      }
View Full Code Here

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

    AccessTestAction listTablesAction = new AccessTestAction() {
      @Override
      public Object run() throws Exception {
        HBaseAdmin admin = new HBaseAdmin(TEST_UTIL.getConfiguration());
        try {
          admin.listTables();
        } finally {
          admin.close();
        }
        return null;
      }
View Full Code Here

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

    super.setUp();
  }
 
  public void deleteAllTables() throws Exception {
    HBaseAdmin admin = hbaseUtil.getHBaseAdmin();
    for(HTableDescriptor table:admin.listTables()) {
      admin.disableTable(table.getName());
      admin.deleteTable(table.getName());
    }
  }
 
View Full Code Here

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

   
    MiniHBaseCluster cluster = new MiniHBaseCluster(this.conf, 1);
    try {
      HBaseAdmin hb = new HBaseAdmin(this.conf);
      assertTrue(hb.isMasterRunning());
      HTableDescriptor [] tables = hb.listTables();
      boolean foundTable = false;
      for (int i = 0; i < tables.length; i++) {
        if (Bytes.equals(Bytes.toBytes(TABLENAME), tables[i].getName())) {
          foundTable = true;
          break;
View Full Code Here

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

    // Try doing a duplicate database create.
    msg = null;
    HTableDescriptor desc = new HTableDescriptor(getName());
    desc.addFamily(new HColumnDescriptor(HConstants.COLUMN_FAMILY));
    admin.createTable(desc);
    assertTrue("First table creation completed", admin.listTables().length == 1);
    boolean gotException = false;
    try {
      admin.createTable(desc);
    } catch (TableExistsException e) {
      gotException = true;
View Full Code Here

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

    super.setUp();
  }
 
  public void deleteAllTables() throws Exception {
    HBaseAdmin admin = hbaseUtil.getHBaseAdmin();
    for(HTableDescriptor table:admin.listTables()) {
      admin.disableTable(table.getName());
      admin.deleteTable(table.getName());
    }
  }
 
View Full Code Here

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

    // Try doing a duplicate database create.
    msg = null;
    HTableDescriptor desc = new HTableDescriptor(getName());
    desc.addFamily(new HColumnDescriptor(HConstants.CATALOG_FAMILY));
    admin.createTable(desc);
    assertTrue("First table creation completed", admin.listTables().length == 1);
    boolean gotException = false;
    try {
      admin.createTable(desc);
    } catch (TableExistsException e) {
      gotException = true;
View Full Code Here

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

      Integer.toString(clientPort));
    MiniHBaseCluster cluster = new MiniHBaseCluster(this.conf, 1);
    try {
      HBaseAdmin hb = new HBaseAdmin(this.conf);
      assertTrue(hb.isMasterRunning());
      HTableDescriptor [] tables = hb.listTables();
      assertEquals(2, tables.length);
      boolean foundTable = false;
      // Just look at table 'a'.
      final String tablenameStr = "a";
      final byte [] tablename = Bytes.toBytes(tablenameStr);
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.