當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。