org.apache.hadoop.hbase.regionserver.Region.flush()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(90)

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

Region.flush介绍

[英]Flush the cache.

When this method is called the cache will be flushed unless:

  1. the cache is empty
  2. the region is closed.
  3. a flush is already in progress
  4. writes are disabled

This method may block for some time, so it should not be called from a time-sensitive thread.
[中]刷新缓存。
调用此方法时,缓存将被刷新,除非:
1.缓存为空
1.该地区已关闭。
1.正在进行冲洗
1.写入被禁用
此方法可能会阻塞一段时间,因此不应从时间敏感线程调用它。

代码示例

代码示例来源:origin: org.apache.omid/omid-hbase-shims-hbase1.x

static public void flushAllOnlineRegions(HRegionServer regionServer, TableName tableName) throws IOException {
  for (Region r : regionServer.getOnlineRegions(tableName)) {
    r.flush(true);
  }
}

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

@Override
 public Void call() throws Exception {
  LOG.debug("Starting region operation on " + region);
  region.startRegionOperation();
  try {
   LOG.debug("Flush region " + region.toString() + " started...");
   region.flush(true);
  } finally {
   LOG.debug("Closing region operation on " + region);
   region.closeRegionOperation();
  }
  return null;
 }
}

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

} else {
 LOG.debug("Flush Snapshotting region " + region.toString() + " started...");
 region.flush(true);

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

try {
 notifyFlushRequest(region, emergencyFlush);
 FlushResult flushResult = region.flush(forceFlushAllStores);
 boolean shouldCompact = flushResult.isCompactionNeeded();

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

+ ",forcible=" + forcible);
long startTime = EnvironmentEdgeManager.currentTime();
FlushResult flushResult = regionA.flush(true);
if (flushResult.isFlushSucceeded()) {
 long endTime = EnvironmentEdgeManager.currentTime();
flushResult = regionB.flush(true);
if (flushResult.isFlushSucceeded()) {
 long endTime = EnvironmentEdgeManager.currentTime();

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

FlushResult flushResult = region.flush(true);
if (flushResult.isFlushSucceeded()) {
 long endTime = EnvironmentEdgeManager.currentTime();

相关文章