Interface YieldingKeyValueIterator<K extends org.apache.hadoop.io.WritableComparable<?>,​V extends org.apache.hadoop.io.Writable>

    • Method Detail

      • enableYielding

        default void enableYielding​(YieldCallback<K> callback)
        Allows implementations to preempt further iteration of this iterator in the current RPC. Implementations can use the yield method on the callback to instruct the caller to cease collecting more results within this RPC. An implementation would only need to implement this mechanism if a next or seek call has been taking so long as to starve out other scans within the same thread pool. Most iterators do not need to implement this method. The yield method on the callback accepts a Key which will be used as the start key (non-inclusive) on the seek call in the next RPC. This feature is not supported for isolated scans.