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


Java KeyValue.KVComparator方法代码示例

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


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

示例1: DefaultMemStore

import org.apache.hadoop.hbase.KeyValue; //导入方法依赖的package包/类
/**
 * Constructor.
 * @param c Comparator
 */
public DefaultMemStore(final Configuration conf,
                final KeyValue.KVComparator c) {
  this.conf = conf;
  this.comparator = c;
  this.cellSet = new CellSkipListSet(c);
  this.snapshot = new CellSkipListSet(c);
  timeRangeTracker = new TimeRangeTracker();
  snapshotTimeRangeTracker = new TimeRangeTracker();
  this.size = new AtomicLong(DEEP_OVERHEAD);
  this.snapshotSize = 0;
  if (conf.getBoolean(USEMSLAB_KEY, USEMSLAB_DEFAULT)) {
    String className = conf.get(MSLAB_CLASS_NAME, HeapMemStoreLAB.class.getName());
    this.allocator = ReflectionUtils.instantiateWithCustomCtor(className,
        new Class[] { Configuration.class }, new Object[] { conf });
  } else {
    this.allocator = null;
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:23,代码来源:DefaultMemStore.java

示例2: LCIndexQueryProcessor

import org.apache.hadoop.hbase.KeyValue; //导入方法依赖的package包/类
public LCIndexQueryProcessor(Scan rawScan, IndexTableRelation indexTableRelation,
    ScanRange primaryRange, ScanRange.ScanRangeList rangeList, HStore store,
    NavigableSet<byte[]> columns, long readPt, KeyValue.KVComparator comparator)
    throws IOException {
  this.rawScan = rawScan;
  this.indexTableRelation = indexTableRelation;
  this.primaryRange = primaryRange;
  this.store = store;
  this.rangeList = rangeList;
  LCIndexMemStoreScanner2 memStoreScanner = getMemstoreScanner(columns, readPt);
  iFileScan = createScanOnIFile(rawScan, primaryRange, rangeList);
  KeyValueScanner scanner =
      store.getLCIndexScanner(iFileScan, columns, readPt, primaryRange, memStoreScanner);
  List<KeyValueScanner> lcIndexScanners = new ArrayList<>();
  lcIndexScanners.add(scanner);
  lcIndexStoreHeap = new KeyValueHeap(lcIndexScanners, comparator);
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:18,代码来源:HRegion.java

示例3: createLCIndexProcessor

import org.apache.hadoop.hbase.KeyValue; //导入方法依赖的package包/类
LCIndexQueryProcessor createLCIndexProcessor(IndexTableRelation indexTableRelation,
    Map<byte[], Store> storeMap, Scan scan, long readPt, KeyValue.KVComparator comparator) {
  try {
    ScanRange.ScanRangeList rangeList = ScanRange.ScanRangeList.getScanRangeList(scan);
    checkSingleScanFamily(scan, rangeList);
    // calculate the primary range for scan
    ScanRange primaryRange =
        selectTheBestRange(indexTableRelation, storeMap, rangeList, scan.getId());
    if (primaryRange != null) {
      printRanges(primaryRange, rangeList);
      return new LCIndexQueryProcessor(scan, indexTableRelation, primaryRange, rangeList,
          (HStore) storeMap.get(primaryRange.getFamily()),
          scan.getFamilyMap().get(primaryRange.getFamily()), readPt, comparator);
    }
  } catch (IOException e) {
    e.printStackTrace();
  }
  return null;
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:20,代码来源:HRegion.java

示例4: CollectionBackedScanner

import org.apache.hadoop.hbase.KeyValue; //导入方法依赖的package包/类
public CollectionBackedScanner(List<Cell> list,
    KeyValue.KVComparator comparator) {
  Collections.sort(list, comparator);
  this.comparator = comparator;
  data = list;
  init();
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:8,代码来源:CollectionBackedScanner.java

示例5: checkScanOrder

import org.apache.hadoop.hbase.KeyValue; //导入方法依赖的package包/类
@Override
protected void checkScanOrder(Cell prevKV, Cell kv,
    KeyValue.KVComparator comparator) throws IOException {
  // Check that the heap gives us KVs in an increasing order for same row and
  // decreasing order for different rows.
  assert prevKV == null || comparator == null || comparator.compareRows(kv, prevKV) < 0
      || (comparator.matchingRows(kv, prevKV) && comparator.compare(kv,
          prevKV) >= 0) : "Key " + prevKV
      + " followed by a " + "error order key " + kv + " in cf " + store
      + " in reversed scan";
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:12,代码来源:ReversedStoreScanner.java

示例6: withComparator

import org.apache.hadoop.hbase.KeyValue; //导入方法依赖的package包/类
public WriterBuilder withComparator(KeyValue.KVComparator comparator) {
  Preconditions.checkNotNull(comparator);
  this.comparator = comparator;
  return this;
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:6,代码来源:StoreFile.java

示例7: CellSkipListSet

import org.apache.hadoop.hbase.KeyValue; //导入方法依赖的package包/类
CellSkipListSet(final KeyValue.KVComparator c) {
  this.delegatee = new ConcurrentSkipListMap<Cell, Cell>(c);
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:4,代码来源:CellSkipListSet.java

示例8: getComparator

import org.apache.hadoop.hbase.KeyValue; //导入方法依赖的package包/类
KeyValue.KVComparator getComparator() {
  return reader.getComparator();
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:4,代码来源:StoreFileScanner.java

示例9: getComparator

import org.apache.hadoop.hbase.KeyValue; //导入方法依赖的package包/类
/**
 * @return KeyValue Comparator
 */
public KeyValue.KVComparator getComparator() {
  return this.comparator;
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:7,代码来源:HRegion.java

示例10: getComparator

import org.apache.hadoop.hbase.KeyValue; //导入方法依赖的package包/类
@Override public KeyValue.KVComparator getComparator() {
  return comparator;
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:4,代码来源:HStore.java

示例11: KeyValueScanFixture

import org.apache.hadoop.hbase.KeyValue; //导入方法依赖的package包/类
public KeyValueScanFixture(KeyValue.KVComparator comparator,
                           KeyValue... incData) {
  super(comparator, incData);
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:5,代码来源:KeyValueScanFixture.java

示例12: checkScanOrder

import org.apache.hadoop.hbase.KeyValue; //导入方法依赖的package包/类
/**
 * Check whether scan as expected order
 *
 * @param prevKV
 * @param kv
 * @param comparator
 * @throws IOException
 */
protected void checkScanOrder(Cell prevKV, Cell kv, KeyValue.KVComparator comparator)
    throws IOException {
  // Check that the heap gives us KVs in an increasing order.
  assert
      prevKV == null || comparator == null || comparator.compare(prevKV, kv) <= 0 :
      "Key " + prevKV + " followed by a " + "smaller key " + kv + " in cf " + store;
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:16,代码来源:StoreScanner.java

示例13: getComparator

import org.apache.hadoop.hbase.KeyValue; //导入方法依赖的package包/类
KeyValue.KVComparator getComparator(); 
开发者ID:fengchen8086,项目名称:ditb,代码行数:2,代码来源:Store.java


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