use of org.apache.hadoop.hbase.regionserver.HRegion.FlushResult in project hbase by apache.
the class MiniHBaseCluster method executeFlush.
private void executeFlush(HRegion region) throws IOException {
if (!RegionReplicaUtil.isDefaultReplica(region.getRegionInfo())) {
return;
}
// retry 5 times if we can not flush
for (int i = 0; i < 5; i++) {
FlushResult result = region.flush(true);
if (result.getResult() != FlushResult.Result.CANNOT_FLUSH) {
return;
}
Threads.sleep(1000);
}
}
Aggregations