Examples of modifyTable()


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

      assertNotNull(status);

      HTableDescriptor htd = admin.getTableDescriptor(table);
      htd.setValue("NOT_DEFAULT", "true");
      admin.disableTable(table);
      admin.modifyTable(table, htd);
      admin.enableTable(table);
      fs.delete(status.getPath(), true);

      // fix OrphanTable with cache
      htd = admin.getTableDescriptor(table); // warms up cached htd on master
View Full Code Here

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

                     * policy class cannot be found on the server, the HBase table is left in a horrible
                     * "ghost" state where it can't be used and can't be deleted without bouncing the master.
                     */
                    newDesc.setValue(HTableDescriptor.SPLIT_POLICY, MetaDataSplitPolicy.class.getName());
                    admin.disableTable(tableName);
                    admin.modifyTable(tableName, newDesc);
                    admin.enableTable(tableName);
                }
                return null;
            } else {
                if (!modifyExistingMetaData || existingDesc.equals(newDesc)) {
View Full Code Here

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

                    checkClientServerCompatibility();
                }
                        
                // TODO: Take advantage of online schema change ability by setting "hbase.online.schema.update.enable" to true
                admin.disableTable(tableName);
                admin.modifyTable(tableName, newDesc);
                admin.enableTable(tableName);
               
                return newDesc;
            }
View Full Code Here

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

        htd.addFamily(hcd);
      }
      HBaseAdmin admin = servlet.getAdmin();
      if (admin.tableExists(name)) {
        admin.disableTable(name);
        admin.modifyTable(name, htd);
        admin.enableTable(name);
      } else try {
        admin.createTable(htd);
      } catch (TableExistsException e) {
        // race, someone else created a table with the same name
View Full Code Here

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

      assertNotNull(status);

      HTableDescriptor htd = admin.getTableDescriptor(table);
      htd.setValue("NOT_DEFAULT", "true");
      admin.disableTable(table);
      admin.modifyTable(table, htd);
      admin.enableTable(table);
      fs.delete(status.getPath(), true);

      // fix OrphanTable with cache
      htd = admin.getTableDescriptor(table); // warms up cached htd on master
View Full Code Here

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

    // disable table before modification
    admin.disableTable(tableName);

    User newOwner = User.createUserForTesting(conf, "new_owner", new String[] {});
    htd.setOwner(newOwner);
    admin.modifyTable(tableName, htd);

    acl = new HTable(conf, AccessControlLists.ACL_TABLE_NAME);
    try {
      BlockingRpcChannel service = acl.coprocessorService(tableName.getName());
      AccessControlService.BlockingInterface protocol =
View Full Code Here

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

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

    // modify table
    htd.setMaxFileSize(512 * 1024 * 1024);
    admin.modifyTable(TEST_TABLE, htd);
    // preModifyTable can't bypass default action.
    assertTrue("Test table should have been modified",
      cp.wasModifyTableCalled());

    // add a column family
View Full Code Here

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

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

    // modify table
    htd.setMaxFileSize(512 * 1024 * 1024);
    admin.modifyTable(TEST_TABLE, htd);
    assertTrue("Test table should have been modified",
        cp.wasModifyTableCalled());

    // add a column family
    admin.addColumn(TEST_TABLE, new HColumnDescriptor(TEST_FAMILY2));
View Full Code Here

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

      assertNotNull(status);

      HTableDescriptor htd = admin.getTableDescriptor(table);
      htd.setValue("NOT_DEFAULT", "true");
      admin.disableTable(table);
      admin.modifyTable(table, htd);
      admin.enableTable(table);
      fs.delete(status.getPath(), true);

      // fix OrphanTable with cache
      htd = admin.getTableDescriptor(table); // warms up cached htd on master
View Full Code Here

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

      // Modify the table adding another family and verify the descriptor
      HTableDescriptor modifiedHtd = new HTableDescriptor(TABLE_NAME);
      modifiedHtd.addFamily(new HColumnDescriptor(FAMILY_0));
      modifiedHtd.addFamily(new HColumnDescriptor(FAMILY_1));
      admin.modifyTable(TABLE_NAME, modifiedHtd);
      verifyTableDescriptor(TABLE_NAME, FAMILY_0, FAMILY_1);
    } finally {
      admin.deleteTable(TABLE_NAME);
    }
  }
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.