Package org.apache.hadoop.hbase.client

Examples of org.apache.hadoop.hbase.client.Admin.addColumn()


    try {
      // Verify the table descriptor
      verifyTableDescriptor(TABLE_NAME, FAMILY_0);

      // Modify the table removing one family and verify the descriptor
      admin.addColumn(TABLE_NAME, new HColumnDescriptor(FAMILY_1));
      verifyTableDescriptor(TABLE_NAME, FAMILY_0, FAMILY_1);
    } finally {
      admin.deleteTable(TABLE_NAME);
    }
  }
View Full Code Here


    deleteColumn.await();

    try {
      Admin admin = TEST_UTIL.getHBaseAdmin();
      admin.addColumn(TABLE_NAME, new HColumnDescriptor(NEW_FAMILY));
      fail("Was expecting TableLockTimeoutException");
    } catch (LockTimeoutException ex) {
      //expected
    }
    shouldFinish.get();
View Full Code Here

    ExecutorService executor = Executors.newFixedThreadPool(2);
    Future<Object> alterTableFuture = executor.submit(new Callable<Object>() {
      @Override
      public Object call() throws Exception {
        Admin admin = TEST_UTIL.getHBaseAdmin();
        admin.addColumn(TABLE_NAME, new HColumnDescriptor(NEW_FAMILY));
        LOG.info("Added new column family");
        HTableDescriptor tableDesc = admin.getTableDescriptor(TABLE_NAME);
        assertTrue(tableDesc.getFamiliesKeys().contains(NEW_FAMILY));
        return null;
      }
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.