本文整理汇总了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();