gpt4 book ai didi

org.apache.accumulo.core.iterators.YieldCallback.getPositionAndReset()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 19:23:31 28 4
gpt4 key购买 nike

本文整理了Java中org.apache.accumulo.core.iterators.YieldCallback.getPositionAndReset()方法的一些代码示例,展示了YieldCallback.getPositionAndReset()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YieldCallback.getPositionAndReset()方法的具体详情如下:
包路径:org.apache.accumulo.core.iterators.YieldCallback
类名称:YieldCallback
方法名:getPositionAndReset

YieldCallback.getPositionAndReset介绍

[英]Called by the client to get the yield position used as the start key (non-inclusive) of the range in a subsequent seek call when the iterator is rebuilt. This will also reset the state returned by hasYielded.
[中]由客户端调用,以在重建迭代器时,在后续的seek调用中获取用作范围的开始键(非包含)的屈服位置。这也将重置HasGender返回的状态。

代码示例

代码示例来源:origin: apache/accumulo

if (yield.hasYielded()) {
 throw new IOException(
   "Coding error: hasTop returned true but has yielded at " + yield.getPositionAndReset());
continueKey = new Key(yield.getPositionAndReset());
skipContinueKey = true;
if (!range.contains(continueKey)) {

代码示例来源:origin: apache/accumulo

if (yield.hasYielded()) {
 throw new IOException("Coding error: hasTop returned true but has yielded at "
   + yield.getPositionAndReset());
Key yieldPosition = yield.getPositionAndReset();
if (!range.contains(yieldPosition)) {
 throw new IOException("Underlying iterator yielded to a position outside of its range: "

代码示例来源: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

iter.seek(range, columnFamilies, inclusive);
else if (yielded) {
 Key yieldPosition = yield.get().getPositionAndReset();
 if (!range.contains(yieldPosition)) {
  throw new IOException("Underlying iterator yielded to a position outside of its range: "
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-tserver

if (yield.hasYielded()) {
 throw new IOException(
   "Coding error: hasTop returned true but has yielded at " + yield.getPositionAndReset());
continueKey = new Key(yield.getPositionAndReset());
skipContinueKey = true;
if (!range.contains(continueKey)) {

代码示例来源:origin: org.apache.accumulo/accumulo-tserver

if (yield.hasYielded()) {
 throw new IOException("Coding error: hasTop returned true but has yielded at "
   + yield.getPositionAndReset());
Key yieldPosition = yield.getPositionAndReset();
if (!range.contains(yieldPosition)) {
 throw new IOException("Underlying iterator yielded to a position outside of its range: "

代码示例来源: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-core

iter.seek(range, columnFamilies, inclusive);
else if (yielded) {
 Key yieldPosition = yield.get().getPositionAndReset();
 if (!range.contains(yieldPosition)) {
  throw new IOException("Underlying iterator yielded to a position outside of its range: "
if (yield.isPresent() && yield.get().hasYielded()) {
 throw new IOException("Coding error: hasTop returned true but has yielded at "
   + yield.get().getPositionAndReset());

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com