本文整理了Java中org.apache.accumulo.core.iterators.YieldCallback.hasYielded()
方法的一些代码示例,展示了YieldCallback.hasYielded()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YieldCallback.hasYielded()
方法的具体详情如下:
包路径:org.apache.accumulo.core.iterators.YieldCallback
类名称:YieldCallback
方法名:hasYielded
[英]Called by the client to see if the iterator yielded
[中]客户端调用以查看迭代器是否
代码示例来源:origin: apache/accumulo
if (yield.hasYielded()) {
throw new IOException(
"Coding error: hasTop returned true but has yielded at " + yield.getPositionAndReset());
if (yield.hasYielded()) {
continueKey = new Key(yield.getPositionAndReset());
skipContinueKey = true;
代码示例来源:origin: apache/accumulo
TreeMap<Key,Value> consume(IteratorTestInput testInput, SortedKeyValueIterator<Key,Value> skvi,
YieldCallback<Key> yield) throws IOException {
TreeMap<Key,Value> data = new TreeMap<>();
Key lastKey = null;
while (yield.hasYielded() || skvi.hasTop()) {
if (yield.hasYielded()) {
Range r = testInput.getRange();
Key yieldPosition = yield.getPositionAndReset();
if (!r.contains(yieldPosition)) {
throw new IOException("Underlying iterator yielded to a position outside of its range: "
+ yieldPosition + " not in " + r);
}
if (skvi.hasTop()) {
throw new IOException(
"Underlying iterator reports having a top, but has yielded: " + yieldPosition);
}
if (lastKey != null && yieldPosition.compareTo(lastKey) <= 0) {
throw new IOException(
"Underlying iterator yielded at a position that is not past the last key returned");
}
skvi.seek(new Range(yieldPosition, false, r.getEndKey(), r.isEndKeyInclusive()),
testInput.getFamilies(), testInput.isInclusive());
} else {
// Make sure to copy the K-V
data.put(new Key(skvi.getTopKey()), new Value(skvi.getTopValue()));
skvi.next();
}
}
return data;
}
代码示例来源:origin: apache/accumulo
if (yield.hasYielded()) {
throw new IOException("Coding error: hasTop returned true but has yielded at "
+ yield.getPositionAndReset());
if (yield.hasYielded()) {
yielded = true;
Key yieldPosition = yield.getPositionAndReset();
代码示例来源:origin: apache/accumulo
boolean yielded = (yield.isPresent() && yield.get().hasYielded());
if (yield.isPresent() && yield.get().hasYielded()) {
throw new IOException("Coding error: hasTop returned true but has yielded at "
+ yield.get().getPositionAndReset());
代码示例来源:origin: org.apache.accumulo/accumulo-test
@Override
public boolean hasTop() {
return (!(yield.isPresent() && yield.get().hasYielded()) && super.hasTop());
}
代码示例来源:origin: org.apache.accumulo/accumulo-iterator-test-harness
TreeMap<Key,Value> consume(IteratorTestInput testInput, SortedKeyValueIterator<Key,Value> skvi,
YieldCallback<Key> yield) throws IOException {
TreeMap<Key,Value> data = new TreeMap<>();
Key lastKey = null;
while (yield.hasYielded() || skvi.hasTop()) {
if (yield.hasYielded()) {
Range r = testInput.getRange();
Key yieldPosition = yield.getPositionAndReset();
if (!r.contains(yieldPosition)) {
throw new IOException("Underlying iterator yielded to a position outside of its range: "
+ yieldPosition + " not in " + r);
}
if (skvi.hasTop()) {
throw new IOException(
"Underlying iterator reports having a top, but has yielded: " + yieldPosition);
}
if (lastKey != null && yieldPosition.compareTo(lastKey) <= 0) {
throw new IOException(
"Underlying iterator yielded at a position that is not past the last key returned");
}
skvi.seek(new Range(yieldPosition, false, r.getEndKey(), r.isEndKeyInclusive()),
testInput.getFamilies(), testInput.isInclusive());
} else {
// Make sure to copy the K-V
data.put(new Key(skvi.getTopKey()), new Value(skvi.getTopValue()));
skvi.next();
}
}
return data;
}
代码示例来源:origin: org.apache.accumulo/accumulo-tserver
if (yield.hasYielded()) {
throw new IOException(
"Coding error: hasTop returned true but has yielded at " + yield.getPositionAndReset());
if (yield.hasYielded()) {
continueKey = new Key(yield.getPositionAndReset());
skipContinueKey = true;
代码示例来源:origin: org.apache.accumulo/accumulo-tserver
if (yield.hasYielded()) {
throw new IOException("Coding error: hasTop returned true but has yielded at "
+ yield.getPositionAndReset());
if (yield.hasYielded()) {
yielded = true;
Key yieldPosition = yield.getPositionAndReset();
代码示例来源:origin: org.apache.accumulo/accumulo-core
boolean yielded = (yield.isPresent() && yield.get().hasYielded());
if (yield.isPresent() && yield.get().hasYielded()) {
throw new IOException("Coding error: hasTop returned true but has yielded at "
+ yield.get().getPositionAndReset());
内容来源于网络,如有侵权,请联系作者删除!