Class PartitionIterators


  • public abstract class PartitionIterators
    extends java.lang.Object
    • Method Detail

      • consumeNext

        public static void consumeNext​(PartitionIterator iterator)
        Consumes all rows in the next partition of the provided partition iterator.
      • loggingIterator

        public static PartitionIterator loggingIterator​(PartitionIterator iterator,
                                                        java.lang.String id)
        Wraps the provided iterator so it logs the returned rows for debugging purposes.

        Note that this is only meant for debugging as this can log a very large amount of logging at INFO.

      • doOnClose

        public static PartitionIterator doOnClose​(PartitionIterator delegate,
                                                  java.lang.Runnable action)
        Wraps the provided iterator to run a specified action on close. Note that the action will be run even if closure of the provided iterator throws an exception.