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

x33g5p2x  于2022-01-30 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(207)

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

Store.canSplit介绍

[英]Returns whether this store is splittable, i.e., no reference file in this store.
[中]返回此存储是否可拆分,即此存储中没有引用文件。

代码示例

代码示例来源:origin: co.cask.hbase/hbase

@Override
protected boolean shouldSplit() {
 boolean force = region.shouldForceSplit();
 boolean foundABigStore = false;
 for (Store store : region.getStores().values()) {
  // If any of the stores are unable to split (eg they contain reference files)
  // then don't split
  if ((!store.canSplit())) {
   return false;
  }
  // Mark if any store is big enough
  if (store.getSize() > desiredMaxFileSize) {
   foundABigStore = true;
  }
 }
 return foundABigStore || force;
}

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

@Override
protected boolean shouldSplit() {
 boolean force = region.shouldForceSplit();
 boolean foundABigStore = false;
 for (Store store : region.getStores()) {
  // If any of the stores are unable to split (eg they contain reference files)
  // then don't split
  if ((!store.canSplit())) {
   return false;
  }
  // Mark if any store is big enough
  if (store.getSize() > desiredMaxFileSize) {
   foundABigStore = true;
  }
 }
 return foundABigStore || force;
}

代码示例来源:origin: co.cask.hbase/hbase

@Override
protected boolean shouldSplit() {
 if (region.shouldForceSplit()) return true;
 boolean foundABigStore = false;
 // Get count of regions that have the same common table as this.region
 int tableRegionsCount = getCountOfCommonTableRegions();
 // Get size to check
 long sizeToCheck = getSizeToCheck(tableRegionsCount);
 for (Store store : region.getStores().values()) {
  // If any of the stores is unable to split (eg they contain reference files)
  // then don't split
  if ((!store.canSplit())) {
   return false;
  }
  // Mark if any store is big enough
  long size = store.getSize();
  if (size > sizeToCheck) {
   LOG.debug("ShouldSplit because " + store.getColumnFamilyName() +
    " size=" + size + ", sizeToCheck=" + sizeToCheck +
    ", regionsWithCommonTable=" + tableRegionsCount);
   foundABigStore = true;
   break;
  }
 }
 return foundABigStore;
}

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

@Override
protected boolean shouldSplit() {
 boolean force = region.shouldForceSplit();
 boolean foundABigStore = false;
 // Get count of regions that have the same common table as this.region
 int tableRegionsCount = getCountOfCommonTableRegions();
 // Get size to check
 long sizeToCheck = getSizeToCheck(tableRegionsCount);
 for (Store store : region.getStores()) {
  // If any of the stores is unable to split (eg they contain reference files)
  // then don't split
  if (!store.canSplit()) {
   return false;
  }
  // Mark if any store is big enough
  long size = store.getSize();
  if (size > sizeToCheck) {
   LOG.debug("ShouldSplit because " + store.getColumnFamilyName() + " size=" + size
        + ", sizeToCheck=" + sizeToCheck + ", regionsWithCommonTable="
        + tableRegionsCount);
   foundABigStore = true;
  }
 }
 return foundABigStore | force;
}

相关文章