本文整理汇总了Java中org.apache.hadoop.hbase.regionserver.ScannerContext类的典型用法代码示例。如果您正苦于以下问题:Java ScannerContext类的具体用法?Java ScannerContext怎么用?Java ScannerContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ScannerContext类属于org.apache.hadoop.hbase.regionserver包,在下文中一共展示了ScannerContext类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: nextRaw
import org.apache.hadoop.hbase.regionserver.ScannerContext; //导入依赖的package包/类
@Override
public boolean nextRaw(final List<Cell> output, final ScannerContext scannerContext) throws IOException {
final List<Cell> input = new ArrayList<>();
final boolean shouldContinue = getScanner().nextRaw(input);
_next(input, output);
return shouldContinue;
}
开发者ID:gchq,项目名称:Gaffer,代码行数:8,代码来源:QueryScanner.java
示例2: preCompact
import org.apache.hadoop.hbase.regionserver.ScannerContext; //导入依赖的package包/类
@Override
public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> e, Store store,
InternalScanner scanner, ScanType scanType, CompactionLifeCycleTracker tracker,
CompactionRequest request) {
return new InternalScanner() {
@Override
public boolean next(List<Cell> results, ScannerContext scannerContext) throws IOException {
List<Cell> internalResults = new ArrayList<>();
boolean hasMore;
do {
hasMore = scanner.next(internalResults, scannerContext);
if (!internalResults.isEmpty()) {
long row = Bytes.toLong(CellUtil.cloneValue(internalResults.get(0)));
if (row % 2 == 0) {
// return this row
break;
}
// clear and continue
internalResults.clear();
}
} while (hasMore);
if (!internalResults.isEmpty()) {
results.addAll(internalResults);
}
return hasMore;
}
@Override
public void close() throws IOException {
scanner.close();
}
};
}
开发者ID:apache,项目名称:hbase,代码行数:36,代码来源:TestRegionObserverInterface.java
示例3: next
import org.apache.hadoop.hbase.regionserver.ScannerContext; //导入依赖的package包/类
@Override
public boolean next(List<Cell> result, ScannerContext scannerContext)
throws IOException {
if (kvs.isEmpty()) return false;
result.add(kvs.remove(0));
return !kvs.isEmpty();
}
开发者ID:apache,项目名称:hbase,代码行数:8,代码来源:TestStripeCompactionPolicy.java
示例4: internalNext
import org.apache.hadoop.hbase.regionserver.ScannerContext; //导入依赖的package包/类
public boolean internalNext(List<Cell> outResult,ScannerContext scannerContext) throws IOException {
if (beginRow) {
beginRow = false;
if (LOG.isTraceEnabled())
SpliceLogUtils.trace(LOG, "Next: memstore begin");
return outResult.add(ClientRegionConstants.MEMSTORE_BEGIN);
}
if (endRowNeedsToBeReturned) {
try {
outResult.add(new KeyValue(Bytes.toBytes(counter), ClientRegionConstants.HOLD, ClientRegionConstants.HOLD, HConstants.LATEST_TIMESTAMP, ClientRegionConstants.HOLD));
return HBasePlatformUtils.scannerEndReached(scannerContext);
} finally {
counter++;
}
}
if (didWeFlush()) {
if (flushAlreadyReturned) {
try {
outResult.add(new KeyValue(Bytes.toBytes(counter),
ClientRegionConstants.FLUSH, ClientRegionConstants.FLUSH, Long.MAX_VALUE, ClientRegionConstants.FLUSH));
return HBasePlatformUtils.scannerEndReached(scannerContext);
} finally {
counter++;
}
} else {
flushAlreadyReturned = true;
if (LOG.isTraceEnabled())
SpliceLogUtils.trace(LOG, "Next: returning begin flush ");
outResult.add(ClientRegionConstants.MEMSTORE_BEGIN_FLUSH);
}
return HBasePlatformUtils.scannerEndReached(scannerContext);
}
return directInternalNext(outResult,scannerContext);
}
开发者ID:splicemachine,项目名称:spliceengine,代码行数:35,代码来源:MemStoreFlushAwareScanner.java
示例5: next
import org.apache.hadoop.hbase.regionserver.ScannerContext; //导入依赖的package包/类
@Override
public boolean next(List<Cell> result, ScannerContext scannerContext)
throws IOException {
return delegate.next(result, scannerContext);
}
开发者ID:fengchen8086,项目名称:ditb,代码行数:6,代码来源:TestCoprocessorInterface.java
示例6: nextRaw
import org.apache.hadoop.hbase.regionserver.ScannerContext; //导入依赖的package包/类
@Override
public boolean nextRaw(List<Cell> result, ScannerContext context)
throws IOException {
return delegate.nextRaw(result, context);
}
开发者ID:fengchen8086,项目名称:ditb,代码行数:6,代码来源:TestCoprocessorInterface.java
示例7: next
import org.apache.hadoop.hbase.regionserver.ScannerContext; //导入依赖的package包/类
@Override
public boolean next(List<Cell> result, ScannerContext scannerContext)
throws IOException {
return next(result);
}
开发者ID:fengchen8086,项目名称:ditb,代码行数:6,代码来源:TestStripeCompactionPolicy.java
示例8: next
import org.apache.hadoop.hbase.regionserver.ScannerContext; //导入依赖的package包/类
public boolean next(List<Cell> result,
ScannerContext scannerContext) throws IOException {
return next(result, scannerContext.getBatchLimit());
}
开发者ID:apache,项目名称:incubator-omid,代码行数:5,代码来源:OmidRegionScanner.java
示例9: nextRaw
import org.apache.hadoop.hbase.regionserver.ScannerContext; //导入依赖的package包/类
public boolean nextRaw(List<Cell> result,
ScannerContext scannerContext) throws IOException {
return nextRaw(result, scannerContext.getBatchLimit());
}
开发者ID:apache,项目名称:incubator-omid,代码行数:5,代码来源:OmidRegionScanner.java
示例10: next
import org.apache.hadoop.hbase.regionserver.ScannerContext; //导入依赖的package包/类
@Override
public boolean next(final List<Cell> output, final ScannerContext scannerContext) throws IOException {
return next(output);
}
开发者ID:gchq,项目名称:Gaffer,代码行数:5,代码来源:GafferScanner.java
示例11: next
import org.apache.hadoop.hbase.regionserver.ScannerContext; //导入依赖的package包/类
@Override
public boolean next(List<Cell> result, ScannerContext scannerContext) throws IOException {
return delegate.next(result, scannerContext);
}
开发者ID:apache,项目名称:hbase,代码行数:5,代码来源:TestBlockEvictionFromClient.java
示例12: next
import org.apache.hadoop.hbase.regionserver.ScannerContext; //导入依赖的package包/类
@Override
public boolean next(List<Cell> result, ScannerContext scannerContext) throws IOException {
return false;
}
开发者ID:apache,项目名称:hbase,代码行数:5,代码来源:TestRegionObserverScannerOpenHook.java
示例13: next
import org.apache.hadoop.hbase.regionserver.ScannerContext; //导入依赖的package包/类
@Override
public boolean next(List<Cell> result, ScannerContext scannerContext) throws IOException {
if (kvs.isEmpty()) return false;
result.add(kvs.remove(0));
return !kvs.isEmpty();
}
开发者ID:apache,项目名称:hbase,代码行数:7,代码来源:TestCompactor.java
示例14: next
import org.apache.hadoop.hbase.regionserver.ScannerContext; //导入依赖的package包/类
@Override
public boolean next(List<Cell> result, ScannerContext scannerContext) throws IOException {
return scanner.next(result, scannerContext);
}
开发者ID:apache,项目名称:hbase,代码行数:5,代码来源:DelegatingInternalScanner.java
示例15: wrap
import org.apache.hadoop.hbase.regionserver.ScannerContext; //导入依赖的package包/类
private InternalScanner wrap(byte[] family, InternalScanner scanner) {
return new InternalScanner() {
private List<Cell> srcResult = new ArrayList<>();
private byte[] row;
private byte[] qualifier;
private long timestamp;
private long sum;
@Override
public boolean next(List<Cell> result, ScannerContext scannerContext) throws IOException {
boolean moreRows = scanner.next(srcResult, scannerContext);
if (srcResult.isEmpty()) {
if (!moreRows && row != null) {
result.add(createCell(row, family, qualifier, timestamp, sum));
}
return moreRows;
}
Cell firstCell = srcResult.get(0);
// Check if there is a row change first. All the cells will come from the same row so just
// check the first one once is enough.
if (row == null) {
row = CellUtil.cloneRow(firstCell);
qualifier = CellUtil.cloneQualifier(firstCell);
} else if (!CellUtil.matchingRows(firstCell, row)) {
result.add(createCell(row, family, qualifier, timestamp, sum));
row = CellUtil.cloneRow(firstCell);
qualifier = CellUtil.cloneQualifier(firstCell);
sum = 0;
}
srcResult.forEach(c -> {
if (CellUtil.matchingQualifier(c, qualifier)) {
sum += Bytes.toLong(c.getValueArray(), c.getValueOffset());
} else {
result.add(createCell(row, family, qualifier, timestamp, sum));
qualifier = CellUtil.cloneQualifier(c);
sum = Bytes.toLong(c.getValueArray(), c.getValueOffset());
}
timestamp = c.getTimestamp();
});
if (!moreRows) {
result.add(createCell(row, family, qualifier, timestamp, sum));
}
srcResult.clear();
return moreRows;
}
@Override
public void close() throws IOException {
scanner.close();
}
};
}
开发者ID:apache,项目名称:hbase,代码行数:58,代码来源:WriteHeavyIncrementObserver.java
示例16: next
import org.apache.hadoop.hbase.regionserver.ScannerContext; //导入依赖的package包/类
@Override
public boolean next(List<Cell> result, ScannerContext scannerContext) throws IOException {
return next(result);
}
开发者ID:splicemachine,项目名称:spliceengine,代码行数:5,代码来源:SICompactionScanner.java
示例17: nextRaw
import org.apache.hadoop.hbase.regionserver.ScannerContext; //导入依赖的package包/类
public boolean nextRaw(List<Cell> cells, ScannerContext scannerContext) throws IOException {
return nextRaw(cells);
}
开发者ID:splicemachine,项目名称:spliceengine,代码行数:4,代码来源:HBase10ClientSideRegionScanner.java
示例18: next
import org.apache.hadoop.hbase.regionserver.ScannerContext; //导入依赖的package包/类
public boolean next(List<Cell> cells, ScannerContext scannerContext) throws IOException {
return nextRaw(cells);
}
开发者ID:splicemachine,项目名称:spliceengine,代码行数:4,代码来源:HBase10ClientSideRegionScanner.java
示例19: nextRaw
import org.apache.hadoop.hbase.regionserver.ScannerContext; //导入依赖的package包/类
@Override
public boolean nextRaw(List<Cell> result, ScannerContext scannerContext) throws IOException {
return nextInternal(result);
}
开发者ID:splicemachine,项目名称:spliceengine,代码行数:5,代码来源:SplitRegionScanner.java
示例20: next
import org.apache.hadoop.hbase.regionserver.ScannerContext; //导入依赖的package包/类
@Override
public boolean next(List<Cell> result, ScannerContext scannerContext) throws IOException {
return nextInternal(result);
}
开发者ID:splicemachine,项目名称:spliceengine,代码行数:5,代码来源:SplitRegionScanner.java
注:本文中的org.apache.hadoop.hbase.regionserver.ScannerContext类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论