本文整理匯總了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;
}
}
示例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);
}
示例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;
}
示例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();
}
示例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";
}
示例6: withComparator
import org.apache.hadoop.hbase.KeyValue; //導入方法依賴的package包/類
public WriterBuilder withComparator(KeyValue.KVComparator comparator) {
Preconditions.checkNotNull(comparator);
this.comparator = comparator;
return this;
}
示例7: CellSkipListSet
import org.apache.hadoop.hbase.KeyValue; //導入方法依賴的package包/類
CellSkipListSet(final KeyValue.KVComparator c) {
this.delegatee = new ConcurrentSkipListMap<Cell, Cell>(c);
}
示例8: getComparator
import org.apache.hadoop.hbase.KeyValue; //導入方法依賴的package包/類
KeyValue.KVComparator getComparator() {
return reader.getComparator();
}
示例9: getComparator
import org.apache.hadoop.hbase.KeyValue; //導入方法依賴的package包/類
/**
* @return KeyValue Comparator
*/
public KeyValue.KVComparator getComparator() {
return this.comparator;
}
示例10: getComparator
import org.apache.hadoop.hbase.KeyValue; //導入方法依賴的package包/類
@Override public KeyValue.KVComparator getComparator() {
return comparator;
}
示例11: KeyValueScanFixture
import org.apache.hadoop.hbase.KeyValue; //導入方法依賴的package包/類
public KeyValueScanFixture(KeyValue.KVComparator comparator,
KeyValue... incData) {
super(comparator, incData);
}
示例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;
}
示例13: getComparator
import org.apache.hadoop.hbase.KeyValue; //導入方法依賴的package包/類
KeyValue.KVComparator getComparator();