本文整理汇总了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);
}