Github user dlmarion commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/260#discussion_r119457446
  
    --- Diff: 
core/src/main/java/org/apache/accumulo/core/iterators/SortedKeyValueIterator.java
 ---
    @@ -147,4 +147,35 @@
        *              if not supported.
        */
       SortedKeyValueIterator<K,V> deepCopy(IteratorEnvironment env);
    +
    +  /**
    +   * Called when the client (i.e. calling iterator or the tserver) will 
support this iterators ability to yield. If called (and true is returned), then 
when
    +   * next or seek is called this iterator may yield before finding the 
next top value and key. When this happens, the yield position (returned by
    +   * getYieldPosition) will be used when this iterator is rebuilt to seek 
to the position at which it yielded. This iterator can only yield if the user 
of this
    +   * iterator has called this method. Note that setYieldSupported will 
never be called in row isolation mode.
    +   *
    +   * @return <tt>boolean</tt> True if this iterator supported yielding, 
false otherwise.
    +   */
    +  default boolean setYieldSupported() {
    +    return false;
    +  }
    +
    +  /**
    +   * If setYieldSupported has been called and true was returned, then this 
method will be called after every seek and next call.
    +   *
    +   * @return <tt>boolean</tt> true if the previous next or seek call has 
yielded without finding the next top key.
    +   */
    +  default boolean hasYielded() {
    +    return false;
    +  }
    +
    +  /**
    +   * If hasYielded returned true, then this will return the key which will 
be used as the start key (non-inclusive) of the range in the next seek call. No 
other
    +   * method will be called except for seek after calling this method.
    +   *
    +   * @return <tt>K</tt>
    +   */
    +  default K getYieldPosition() {
    --- End diff --
    
    Should this throw an IllegalStateException if hasYielded() returns false?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to