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

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

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

Store.hasReferences介绍

暂无

代码示例

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

@Override
public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> c, Store store,
    InternalScanner s, ScanType scanType, CompactionLifeCycleTracker tracker,
    CompactionRequest request) throws IOException {
  if (!IndexUtil.isLocalIndexStore(store)) { return s; }
  if (!store.hasReferences()) {
    InternalScanner repairScanner = null;
    if (request.isMajor() && (!RepairUtil.isLocalIndexStoreFilesConsistent(c.getEnvironment(), store))) {
      LOG.info("we have found inconsistent data for local index for region:"
          + c.getEnvironment().getRegion().getRegionInfo());
      if (c.getEnvironment().getConfiguration().getBoolean(LOCAL_INDEX_AUTOMATIC_REPAIR, true)) {
        LOG.info("Starting automatic repair of local Index for region:"
            + c.getEnvironment().getRegion().getRegionInfo());
        repairScanner = getRepairScanner(c.getEnvironment(), store);
      }
    }
    if (repairScanner != null) {
      if (s!=null) {
        s.close();
      }
      return repairScanner;
    } else {
      return s;
    }
  }
  return s;
}

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

boolean hasReferences() {
 return hasReferences(this.storefiles);
}

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

/**
 * @return True if this region has references.
 */
public boolean hasReferences() {
 for (Store store : this.stores.values()) {
  if (store.hasReferences()) return true;
 }
 return false;
}

代码示例来源:origin: org.apache.phoenix/phoenix-core

private boolean checkForReferenceFiles() {
 if(!ScanUtil.isLocalIndex(scan)) return false;
 for (byte[] family : scan.getFamilies()) {
  if (getRegion().getStore(family).hasReferences()) {
   return true;
  }
 }
 return false;
}

代码示例来源:origin: org.apache.phoenix/phoenix-core

@Override
public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> c, Store store,
    InternalScanner s, ScanType scanType, CompactionLifeCycleTracker tracker,
    CompactionRequest request) throws IOException {
  if (!IndexUtil.isLocalIndexStore(store)) { return s; }
  if (!store.hasReferences()) {
    InternalScanner repairScanner = null;
    if (request.isMajor() && (!RepairUtil.isLocalIndexStoreFilesConsistent(c.getEnvironment(), store))) {
      LOG.info("we have found inconsistent data for local index for region:"
          + c.getEnvironment().getRegion().getRegionInfo());
      if (c.getEnvironment().getConfiguration().getBoolean(LOCAL_INDEX_AUTOMATIC_REPAIR, true)) {
        LOG.info("Starting automatic repair of local Index for region:"
            + c.getEnvironment().getRegion().getRegionInfo());
        repairScanner = getRepairScanner(c.getEnvironment(), store);
      }
    }
    if (repairScanner != null) {
      if (s!=null) {
        s.close();
      }
      return repairScanner;
    } else {
      return s;
    }
  }
  return s;
}

代码示例来源:origin: com.aliyun.phoenix/ali-phoenix-core

@Override
public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> c, Store store,
    InternalScanner s, ScanType scanType, CompactionLifeCycleTracker tracker,
    CompactionRequest request) throws IOException {
  if (!IndexUtil.isLocalIndexStore(store)) { return s; }
  if (!store.hasReferences()) {
    InternalScanner repairScanner = null;
    if (request.isMajor() && (!RepairUtil.isLocalIndexStoreFilesConsistent(c.getEnvironment(), store))) {
      LOG.info("we have found inconsistent data for local index for region:"
          + c.getEnvironment().getRegion().getRegionInfo());
      if (c.getEnvironment().getConfiguration().getBoolean(LOCAL_INDEX_AUTOMATIC_REPAIR, true)) {
        LOG.info("Starting automatic repair of local Index for region:"
            + c.getEnvironment().getRegion().getRegionInfo());
        repairScanner = getRepairScanner(c.getEnvironment(), store);
      }
    }
    if (repairScanner != null) {
      if (s!=null) {
        s.close();
      }
      return repairScanner;
    } else {
      return s;
    }
  }
  return s;
}

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

!hasReferences(compactSelection.getFilesToCompact())) {

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

if (s.hasReferences() || s.needsCompaction()) {
 getCompactionRequester().requestCompaction(r, s, "Opening Region", null);

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

if (s.hasReferences() || s.needsCompaction()) {
 this.compactSplitThread.requestSystemCompaction(r, s, "Opening Region");

相关文章