org.apache.hadoop.hbase.client.Admin.getCompactionState()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(185)

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

Admin.getCompactionState介绍

[英]Get the current compaction state of a table. It could be in a major compaction, a minor compaction, both, or none.
[中]获取表的当前压缩状态。它可能是在一个主要的压实,一个次要的压实,两者,或没有。

代码示例

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

private void waitUntilMobCompactionFinished(TableName tableName) throws IOException,
 InterruptedException {
 long finished = EnvironmentEdgeManager.currentTime() + 60000;
 CompactionState state = admin.getCompactionState(tableName, CompactType.MOB);
 while (EnvironmentEdgeManager.currentTime() < finished) {
  if (state == CompactionState.NONE) {
   break;
  }
  state = admin.getCompactionState(tableName, CompactType.MOB);
  Thread.sleep(10);
 }
 assertEquals(CompactionState.NONE, state);
}

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

@Test
 public void testGetCompactionStateAfterRestoringSnapshot()
   throws IOException, InterruptedException {
  // Take a snapshot
  admin.snapshot(snapshotName1, tableName);

  // Restore the snapshot
  admin.disableTable(tableName);
  admin.restoreSnapshot(snapshotName1);

  // Get the compaction state of the restored table
  CompactionState compactionState = admin.getCompactionState(tableName);

  // The compactionState should be NONE because the table is disabled
  assertEquals(CompactionState.NONE, compactionState);
 }
}

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

while (admin.getCompactionState(tableName) != CompactionState.NONE) {
 Thread.sleep(10);

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

while (CompactionState.NONE != admin.getCompactionState(tableName) && retrier.shouldRetry()) {
 retrier.sleepUntilNextRetry();
 admin.getCompactionState(tableName));

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

while (admin.getCompactionState(tableName) != CompactionState.NONE) {
 Thread.sleep(10);

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

while (admin.getCompactionState(tableName) != CompactionState.NONE) {
 Thread.sleep(10);

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

long waitTime = 5000;
long endt = curt + waitTime;
CompactionState state = admin.getCompactionState(table);
while (state == CompactionState.NONE && curt < endt) {
 Thread.sleep(10);
 state = admin.getCompactionState(table);
 curt = System.currentTimeMillis();
 state = admin.getCompactionState(table);
 while (state != CompactionState.NONE && curt < endt) {
  Thread.sleep(10);
  state = admin.getCompactionState(table);

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

CompactionState compactionState = admin.getCompactionState(table.getName());

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

while (admin.getCompactionState(TEST_TABLE) != CompactionState.NONE) {
 Thread.sleep(1000);

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

while (admin.getCompactionState(TEST_TABLE) != CompactionState.NONE) {
 Thread.sleep(1000);

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

private void waitUntilMobCompactionFinished(TableName tableName) throws IOException,
 InterruptedException {
 long finished = EnvironmentEdgeManager.currentTime() + 60000;
 CompactionState state = admin.getCompactionState(tableName, CompactType.MOB);
 while (EnvironmentEdgeManager.currentTime() < finished) {
  if (state == CompactionState.NONE) {
   break;
  }
  state = admin.getCompactionState(tableName, CompactType.MOB);
  Thread.sleep(10);
 }
 assertEquals(CompactionState.NONE, state);
}

代码示例来源:origin: locationtech/geowave

@Override
public boolean mergeData(
  final Index index,
  final PersistentAdapterStore adapterStore,
  final InternalAdapterStore internalAdapterStore,
  final AdapterIndexMappingStore adapterIndexMappingStore,
  final Integer maxRangeDecomposition) {
 if (options.isServerSideLibraryEnabled()) {
  final TableName tableName = getTableName(index.getName());
  try (Admin admin = conn.getAdmin()) {
   admin.compact(tableName);
   // wait for table compaction to finish
   while (!admin.getCompactionState(tableName).equals(CompactionState.NONE)) {
    Thread.sleep(100);
   }
  } catch (final Exception e) {
   LOGGER.error("Cannot compact table '" + index.getName() + "'", e);
   return false;
  }
 } else {
  return DataStoreUtils.mergeData(
    this,
    maxRangeDecomposition,
    index,
    adapterStore,
    internalAdapterStore,
    adapterIndexMappingStore);
 }
 return true;
}

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

while (admin.getCompactionState(tableName) != CompactionState.NONE) {
 Thread.sleep(10);

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

while (CompactionState.NONE != admin.getCompactionState(tableName) && retrier.shouldRetry()) {
 retrier.sleepUntilNextRetry();
 admin.getCompactionState(tableName));

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

while (admin.getCompactionState(tableName) != CompactionState.NONE) {
 Thread.sleep(10);

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

long waitTime = 5000;
long endt = curt + waitTime;
CompactionState state = admin.getCompactionState(table);
while (state == CompactionState.NONE && curt < endt) {
 Thread.sleep(10);
 state = admin.getCompactionState(table);
 curt = System.currentTimeMillis();
 state = admin.getCompactionState(table);
 while (state != CompactionState.NONE && curt < endt) {
  Thread.sleep(10);
  state = admin.getCompactionState(table);

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

while (admin.getCompactionState(tableName) != CompactionState.NONE) {
 Thread.sleep(10);

代码示例来源:origin: harbby/presto-connectors

CompactionState compactionState = admin.getCompactionState(table.getName());

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

while (admin.getCompactionState(TEST_TABLE) != CompactionState.NONE) {
 Thread.sleep(1000);

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

while (admin.getCompactionState(TEST_TABLE) != CompactionState.NONE) {
 Thread.sleep(1000);

相关文章

Admin类方法