Examples of deleteTable()


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

      } catch (IOException e) {
      }
      if (!success) {
        throw new IOException("could not disable table");
      }
      admin.deleteTable(tableResource.getName());
      servlet.getMetrics().incrementSucessfulDeleteRequests(1);
      return Response.ok().build();
    } catch (TableNotFoundException e) {
      servlet.getMetrics().incrementFailedDeleteRequests(1);
      return Response.status(Response.Status.NOT_FOUND)
View Full Code Here

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

    TEST_UTIL.startMiniCluster();
    REST_TEST_UTIL.startServletContainer(TEST_UTIL.getConfiguration());
    HBaseAdmin admin = TEST_UTIL.getHBaseAdmin();
    if (admin.tableExists(TABLE)) {
      if (admin.isTableEnabled(TABLE)) admin.disableTable(TABLE);
      admin.deleteTable(TABLE);
    }
    HTableDescriptor htd = new HTableDescriptor(TableName.valueOf(TABLE));
    htd.addFamily(new HColumnDescriptor(COLUMN_1).setMaxVersions(3));
    htd.addFamily(new HColumnDescriptor(COLUMN_2).setMaxVersions(3));
    htd.addFamily(new HColumnDescriptor(COLUMN_3).setMaxVersions(3));
View Full Code Here

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

          Thread.sleep(3000);
        } catch (InterruptedException e) {
          // do nothing.
        }
      }
      admin.deleteTable(tableName);
    }
  }

}
View Full Code Here

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

      } catch (InterruptedException e) {
        e.printStackTrace();
        fail("Interrupted when trying to disable table " + tablename);
      }
    }
    admin.deleteTable(tbytes);
  }

  /**
   * This creates a clean table and confirms that the table is clean.
   */
 
View Full Code Here

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

      callRollBack = false;
      cluster.getMaster().setCatalogJanitorEnabled(true);
    }
    if (admin.isTableAvailable(tableName) && admin.isTableEnabled(tableName)) {
      admin.disableTable(tableName);
      admin.deleteTable(tableName);
      admin.close();
    }
  }

  /**
 
View Full Code Here

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

      assertTrue(st.rollback(regionServer, regionServer));
      assertTrue(ZKUtil.checkExists(regionServer.getZooKeeper(), node) == -1);
    }
    if (admin.isTableAvailable(tableName) && admin.isTableEnabled(tableName)) {
      admin.disableTable(tableName);
      admin.deleteTable(tableName);
    }
  }
 
  @Test
  public void testShouldClearRITWhenNodeFoundInSplittingState() throws Exception {
View Full Code Here

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

      assertFalse("region is still in transition",
          am.getRegionsInTransition().containsKey(region.getRegionInfo().getEncodedName()));
    }
    if (admin.isTableAvailable(tableName) && admin.isTableEnabled(tableName)) {
      admin.disableTable(tableName);
      admin.deleteTable(tableName);
      admin.close();
    }
  }
 
  @Test(timeout = 60000)
View Full Code Here

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

    htd.setValue("COPROCESSOR$3", jarFileOnHDFS2.toString() + "|" + cpNameInvalid +
      "|" + Coprocessor.PRIORITY_USER);
    HBaseAdmin admin = TEST_UTIL.getHBaseAdmin();
    if (admin.tableExists(tableName)) {
      admin.disableTable(tableName);
      admin.deleteTable(tableName);
    }
    CoprocessorClassLoader.clearCache();
    byte[] startKey = {10, 63};
    byte[] endKey = {12, 43};
    admin.createTable(htd, startKey, endKey, 4);
View Full Code Here

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

        Coprocessor.PRIORITY_USER, kvs);

    HBaseAdmin admin = TEST_UTIL.getHBaseAdmin();
    if (admin.tableExists(tableName)) {
      admin.disableTable(tableName);
      admin.deleteTable(tableName);
    }
    admin.createTable(htd);
    waitForTable(htd.getName());

    // verify that the coprocessor was loaded
View Full Code Here

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

    htd.setValue("COPROCESSOR$2", jarFileOnHDFS.toString() + "|" + cpName2 +
      "|" + Coprocessor.PRIORITY_USER + "|k1=v1,k2=v2,k3=v3");
    HBaseAdmin admin = TEST_UTIL.getHBaseAdmin();
    if (admin.tableExists(tableName)) {
      admin.disableTable(tableName);
      admin.deleteTable(tableName);
    }
    admin.createTable(htd);
    waitForTable(htd.getName());

    // verify that the coprocessors were loaded
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.