Examples of modifyColumn()


Examples of org.apache.hadoop.hbase.HBaseAdmin.modifyColumn()

          // from the exiting descriptor to produce the new descriptor
          columnDesc = getColumnDescriptor(columnName.toString(), columnEntry
              .getValue(), oldColumnDesc);

          // send the changes out to the master
          admin.modifyColumn(new Text(tableName), columnName, columnDesc);

          enableTable(admin, tableName);
          break;
        case NOOP:
          return new ReturnMsg(0, "Invalid operation type.");
View Full Code Here

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

      cp.preAddColumnCalledOnly());

    // modify a column family
    HColumnDescriptor hcd1 = new HColumnDescriptor(TEST_FAMILY2);
    hcd1.setMaxVersions(25);
    admin.modifyColumn(TEST_TABLE, hcd1);
    assertTrue("Second column family should be modified",
      cp.preModifyColumnCalledOnly());

    // truncate table
    admin.truncateTable(TEST_TABLE, false);
View Full Code Here

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

        cp.wasAddColumnHandlerCalled());

    // modify a column family
    HColumnDescriptor hcd = new HColumnDescriptor(TEST_FAMILY2);
    hcd.setMaxVersions(25);
    admin.modifyColumn(TEST_TABLE, hcd);
    assertTrue("Second column family should be modified",
        cp.wasModifyColumnCalled());
    assertTrue("Modify table handler should be called.",
        cp.wasModifyColumnHandlerCalled());
View Full Code Here

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

    for (HColumnDescriptor columnDescriptor: tableDescriptor.getColumnFamilies()) {
      columnDescriptor.setEncryptionType("AES");
      LOG.info("Updating CF schema for " + getTablename() + "." +
        columnDescriptor.getNameAsString());
      admin.disableTable(getTablename());
      admin.modifyColumn(getTablename(), columnDescriptor);
      admin.enableTable(getTablename());
      util.waitFor(30000, 1000, true, new Predicate<IOException>() {
        @Override
        public boolean evaluate() throws IOException {
          return admin.isTableAvailable(getTablename());
View Full Code Here

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

          new SecretKeySpec(keyBytes, cipher.getName())));
      }
      if (isNewCf) {
        admin.addColumn(tableName, columnDesc);
      } else {
        admin.modifyColumn(tableName, columnDesc);
      }
    }
    LOG.info("Enabling table " + tableName);
    admin.enableTable(tableName);
    admin.close();
View Full Code Here

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

    } catch (Exception e) {
    }
    try {
      HColumnDescriptor hcd = new HColumnDescriptor(VisibilityConstants.LABELS_TABLE_FAMILY);
      hcd.setBloomFilterType(BloomType.ROWCOL);
      admin.modifyColumn(LABELS_TABLE_NAME, hcd);
      fail("Lables table should not get altered by user.");
    } catch (Exception e) {
    }
    try {
      HTableDescriptor htd = new HTableDescriptor(LABELS_TABLE_NAME);
View Full Code Here

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

    for (HColumnDescriptor columnDescriptor: tableDescriptor.getColumnFamilies()) {
      columnDescriptor.setEncryptionType("AES");
      LOG.info("Updating CF schema for " + getTablename() + "." +
        columnDescriptor.getNameAsString());
      admin.disableTable(getTablename());
      admin.modifyColumn(getTablename(), columnDescriptor);
      admin.enableTable(getTablename());
      util.waitFor(30000, 1000, true, new Predicate<IOException>() {
        @Override
        public boolean evaluate() throws IOException {
          return admin.isTableAvailable(getTablename());
View Full Code Here

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

          new SecretKeySpec(keyBytes, cipher.getName())));
      }
      if (isNewCf) {
        admin.addColumn(tableName, columnDesc);
      } else {
        admin.modifyColumn(tableName, columnDesc);
      }
    }
    LOG.info("Enabling table " + tableName);
    admin.enableTable(tableName);
    admin.close();
View Full Code Here

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

      cp.preAddColumnCalledOnly());

    // modify a column family
    HColumnDescriptor hcd1 = new HColumnDescriptor(TEST_FAMILY2);
    hcd1.setMaxVersions(25);
    admin.modifyColumn(TEST_TABLE, hcd1);
    assertTrue("Second column family should be modified",
      cp.preModifyColumnCalledOnly());

    // truncate table
    admin.truncateTable(TEST_TABLE, false);
View Full Code Here

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

        cp.wasAddColumnHandlerCalled());

    // modify a column family
    HColumnDescriptor hcd = new HColumnDescriptor(TEST_FAMILY2);
    hcd.setMaxVersions(25);
    admin.modifyColumn(TEST_TABLE, hcd);
    assertTrue("Second column family should be modified",
        cp.wasModifyColumnCalled());
    assertTrue("Modify table handler should be called.",
        cp.wasModifyColumnHandlerCalled());
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.