本文整理匯總了Java中org.apache.hadoop.hbase.HTableDescriptor.remove方法的典型用法代碼示例。如果您正苦於以下問題:Java HTableDescriptor.remove方法的具體用法?Java HTableDescriptor.remove怎麽用?Java HTableDescriptor.remove使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.hadoop.hbase.HTableDescriptor
的用法示例。
在下文中一共展示了HTableDescriptor.remove方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createTable
import org.apache.hadoop.hbase.HTableDescriptor; //導入方法依賴的package包/類
/**
* Creates a new table with indexes defined by IndexDescriptor.
*
* @param indexDesc table descriptor for table
* @throws IOException
* @throws IndexExistedException
*/
public void createTable(IndexTableDescriptor indexDesc)
throws IOException, IndexExistedException {
HTableDescriptor descriptor = new HTableDescriptor(indexDesc.getTableDescriptor());
descriptor.remove(IndexConstants.INDEX_KEY);
admin.createTable(descriptor, indexDesc.getSplitKeys());
admin.disableTable(descriptor.getTableName());
if (indexDesc.hasIndex()) {
// corresponding cct
if (indexDesc.getIndexSpecifications()[0].getIndexType() == IndexType.CCIndex) {
System.out.println("winter new cct of main table: " + Bytes.toString(Bytes
.add(indexDesc.getTableDescriptor().getTableName().getName(), IndexConstants.CCT_FIX)));
HTableDescriptor cctDesc = new HTableDescriptor(TableName.valueOf(Bytes
.add(indexDesc.getTableDescriptor().getTableName().getName(), IndexConstants.CCT_FIX)));
for (HColumnDescriptor f : descriptor.getFamilies()) {
cctDesc.addFamily(f);
}
admin.createTable(cctDesc, indexDesc.getSplitKeys());
}
this.addIndexes(indexDesc.getTableDescriptor().getTableName(),
indexDesc.getIndexSpecifications());
}
enableTable(descriptor.getTableName());
}
示例2: remove
import org.apache.hadoop.hbase.HTableDescriptor; //導入方法依賴的package包/類
/**
* Remove the constraint (and associated information) for the table
* descriptor.
*
* @param desc
* {@link HTableDescriptor} to modify
* @param clazz
* {@link Constraint} class to remove
*/
public static void remove(HTableDescriptor desc,
Class<? extends Constraint> clazz) {
String key = serializeConstraintClass(clazz);
desc.remove(key);
}