org.apache.hadoop.hbase.HBaseTestingUtility.modifyTableSync()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(99)

本文整理了Java中org.apache.hadoop.hbase.HBaseTestingUtility.modifyTableSync()方法的一些代码示例,展示了HBaseTestingUtility.modifyTableSync()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HBaseTestingUtility.modifyTableSync()方法的具体详情如下:
包路径:org.apache.hadoop.hbase.HBaseTestingUtility
类名称:HBaseTestingUtility
方法名:modifyTableSync

HBaseTestingUtility.modifyTableSync介绍

[英]Modify a table, synchronous. Waiting logic similar to that of admin.rb#alter_status.
[中]修改表,同步。等待逻辑类似于admin。rb#改变状态。

代码示例

代码示例来源:origin: apache/hbase

/**
 * Modify table {@code getTableName()} to carry {@link SlowMeCoproScanOperations}.
 */
private void installSlowingCoproc() throws IOException, InterruptedException {
 int replicaCount = conf.getInt(NUM_REPLICA_COUNT_KEY, NUM_REPLICA_COUNT_DEFAULT);
 if (replicaCount == NUM_REPLICA_COUNT_DEFAULT) return;
 TableName t = getTablename();
 Admin admin = util.getAdmin();
 TableDescriptor desc = admin.getDescriptor(t);
 TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(desc);
 builder.setCoprocessor(SlowMeCoproScanOperations.class.getName());
 HBaseTestingUtility.modifyTableSync(admin, builder.build());
}

代码示例来源:origin: apache/hbase

hcd.setMobThreshold(0L);
table1Desc.addFamily(hcd);
HBaseTestingUtility.modifyTableSync(TEST_UTIL.getAdmin(), table1Desc);

代码示例来源:origin: apache/hbase

final byte[] fam3Name = Bytes.toBytes("f3");
table1Desc.addFamily(new HColumnDescriptor(fam3Name));
HBaseTestingUtility.modifyTableSync(TEST_UTIL.getAdmin(), table1Desc);

代码示例来源:origin: apache/hbase

mobHcd.setMobThreshold(5L);
table1Desc.addFamily(mobHcd);
HBaseTestingUtility.modifyTableSync(TEST_UTIL.getAdmin(), table1Desc);
 HBaseTestingUtility.modifyTableSync(TEST_UTIL.getAdmin(), table1Desc);

代码示例来源:origin: org.apache.hbase/hbase-it

/**
 * Modify table {@code getTableName()} to carry {@link SlowMeCoproScanOperations}.
 */
private void installSlowingCoproc() throws IOException, InterruptedException {
 int replicaCount = conf.getInt(NUM_REPLICA_COUNT_KEY, NUM_REPLICA_COUNT_DEFAULT);
 if (replicaCount == NUM_REPLICA_COUNT_DEFAULT) return;
 TableName t = getTablename();
 Admin admin = util.getAdmin();
 TableDescriptor desc = admin.getDescriptor(t);
 TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(desc);
 builder.setCoprocessor(SlowMeCoproScanOperations.class.getName());
 HBaseTestingUtility.modifyTableSync(admin, builder.build());
}

相关文章

HBaseTestingUtility类方法