Examples of disableTable()


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

      status = FSTableDescriptors.getTableInfoPath(fs, hbaseTableDir);
      assertNotNull(status);

      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
View Full Code Here

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

    // and load the table
    UTIL.loadRegion(region, TEST_FAM);

    // shutdown the table so we can manipulate the files
    admin.disableTable(STRING_TABLE_NAME);

    FileSystem fs = UTIL.getTestFileSystem();

    // now attempt to depose the region
    Path regionDir = HRegion.getRegionDir(region.getTableDir().getParent(), region.getRegionInfo());
View Full Code Here

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

    admin.createTable(htd);
    // preCreateTable can't bypass default action.
    assertTrue("Test table should be created", cp.wasCreateTableCalled());

    admin.disableTable(TEST_TABLE);
    assertTrue(admin.isTableDisabled(TEST_TABLE));
    // preDisableTable can't bypass default action.
    assertTrue("Coprocessor should have been called on table disable",
      cp.wasDisableTableCalled());
View Full Code Here

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

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

    admin.disableTable(TEST_TABLE);
    assertTrue(admin.isTableDisabled(TEST_TABLE));

    // modify table
    htd.setMaxFileSize(512 * 1024 * 1024);
    modifyTableSync(admin, TEST_TABLE, htd);
View Full Code Here

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

    assertTrue("Test table should be created", cp.wasCreateTableCalled());

    // disable
    assertFalse(cp.wasDisableTableCalled());

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

    // modify table
View Full Code Here

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

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

    // disable again
    admin.disableTable(TEST_TABLE);
    assertTrue(admin.isTableDisabled(TEST_TABLE));

    // delete column
    assertFalse("No column family deleted yet", cp.wasDeleteColumnCalled());
    admin.deleteColumn(TEST_TABLE, TEST_FAMILY2);
View Full Code Here

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

    if (admin.tableExists(TEST_TABLE)) {
      UTIL.deleteTable(TEST_TABLE);
    }

    admin.createTable(htd);
    admin.disableTable(TEST_TABLE);
    assertTrue(admin.isTableDisabled(TEST_TABLE));

    try {
      // Test snapshot operation
      assertFalse("Coprocessor should not have been called yet",
View Full Code Here

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

      admin.cloneSnapshot(TEST_SNAPSHOT, TEST_CLONE);
      assertTrue("Coprocessor should have been called on snapshot clone",
        cp.wasCloneSnapshotCalled());
      assertFalse("Coprocessor restore should not have been called on snapshot clone",
        cp.wasRestoreSnapshotCalled());
      admin.disableTable(TEST_CLONE);
      assertTrue(admin.isTableDisabled(TEST_TABLE));
      admin.deleteTable(TEST_CLONE);

      // Test restore operation
      cp.resetStates();
View Full Code Here

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

    HBaseAdmin admin = TEST_UTIL.getHBaseAdmin();
    // Create a table with one family
    HTableDescriptor baseHtd = new HTableDescriptor(TABLE_NAME);
    baseHtd.addFamily(new HColumnDescriptor(FAMILY_0));
    admin.createTable(baseHtd);
    admin.disableTable(TABLE_NAME);
    try {
      // Verify the table descriptor
      verifyTableDescriptor(TABLE_NAME, FAMILY_0);

      // Modify the table adding another family and verify the descriptor
View Full Code Here

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

     
     HBaseAdmin hbase = new HBaseAdmin(conf);
     HTableDescriptor[] wordcounts = hbase.listTables("wordcount");
     
     if(wordcounts.length != 0){ //Drop Table if Exists
        hbase.disableTable(TABLE_NAME);
       hbase.deleteTable(TABLE_NAME);
     }
    
     HTableDescriptor wordcount = new HTableDescriptor(TABLE_NAME);
     hbase.createTable(wordcount);
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.