当前位置: 首页>>代码示例>>Java>>正文


Java CompactionRequest.isMajor方法代码示例

本文整理汇总了Java中org.apache.hadoop.hbase.regionserver.compactions.CompactionRequest.isMajor方法的典型用法代码示例。如果您正苦于以下问题:Java CompactionRequest.isMajor方法的具体用法?Java CompactionRequest.isMajor怎么用?Java CompactionRequest.isMajor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.hbase.regionserver.compactions.CompactionRequest的用法示例。


在下文中一共展示了CompactionRequest.isMajor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: preCompact

import org.apache.hadoop.hbase.regionserver.compactions.CompactionRequest; //导入方法依赖的package包/类
@Override
public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> e,
                                  Store store,
                                  InternalScanner scanner,
                                  ScanType scanType,
                                  CompactionRequest request) throws IOException {
    HTableDescriptor desc = e.getEnvironment().getRegion().getTableDesc();
    HColumnDescriptor famDesc
            = desc.getFamily(Bytes.toBytes(store.getColumnFamilyName()));
    boolean omidCompactable = Boolean.valueOf(famDesc.getValue(OMID_COMPACTABLE_CF_FLAG));
    // only column families tagged as compactable are compacted
    // with omid compactor
    if (!omidCompactable) {
        return scanner;
    } else {
        CommitTable.Client commitTableClient = commitTableClientQueue.poll();
        if (commitTableClient == null) {
            commitTableClient = initAndGetCommitTableClient();
        }
        boolean isMajorCompaction = request.isMajor();
        return new CompactorScanner(e,
                scanner,
                commitTableClient,
                commitTableClientQueue,
                isMajorCompaction,
                retainNonTransactionallyDeletedCells);
    }
}
 
开发者ID:apache,项目名称:incubator-omid,代码行数:29,代码来源:OmidCompactor.java

示例2: record

import org.apache.hadoop.hbase.regionserver.compactions.CompactionRequest; //导入方法依赖的package包/类
/**
 * Records the transaction state used for a compaction. This method is called when the compaction starts.
 *
 * @param request {@link CompactionRequest} for the compaction
 * @param snapshot transaction state that will be used for the compaction
 */
public void record(CompactionRequest request, @Nullable TransactionVisibilityState snapshot) {
  if (request.isMajor() && snapshot != null) {
    Transaction tx = TxUtils.createDummyTransaction(snapshot);
    pruneUpperBound = TxUtils.getPruneUpperBound(tx);
    if (LOG.isDebugEnabled()) {
      LOG.debug(
        String.format("Computed prune upper bound %s for compaction request %s using transaction state from time %s",
                      pruneUpperBound, request, snapshot.getTimestamp()));
    }
  } else {
    pruneUpperBound = -1;
  }
}
 
开发者ID:apache,项目名称:incubator-tephra,代码行数:20,代码来源:CompactionState.java


注:本文中的org.apache.hadoop.hbase.regionserver.compactions.CompactionRequest.isMajor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。