Packages

o

com.nvidia.spark.rapids

RmmRapidsRetryIterator

object RmmRapidsRetryIterator extends Logging

Linear Supertypes
Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RmmRapidsRetryIterator
  2. Logging
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class AutoCloseableAttemptSpliterator[T <: AutoCloseable, K] extends Spliterator[K]

    A spliterator that takes an input iterator of auto closeable T, and a function fn that can map T to K, with an additional splitPolicy that can split T into a Seq[T]

    A spliterator that takes an input iterator of auto closeable T, and a function fn that can map T to K, with an additional splitPolicy that can split T into a Seq[T]

    It assumes the type T is AutoCloseable, and that if a split policy is specified, that it is capable of handling splitting one T into a sequence of them.

    When an attempt to invoke function fn is successful, the item T in input will be closed. In the case of a failure, all attempts will be closed. It is the responsibility of the caller to close any remaining items in input that have not been attempted.

    fn must be idempotent: this is a requirement because we may call fn multiple times while handling retries.

    T

    element type that must be AutoCloseable

    K

    fn result type

  2. class NoInputSpliterator[K] extends Spliterator[K]

    A spliterator that doesn't take any inputs, hence it is "empty", and it doesn't know how to split.

    A spliterator that doesn't take any inputs, hence it is "empty", and it doesn't know how to split. It allows the caller to call the function fn once on next.

    K

    the resulting type

  3. class RmmRapidsRetryAutoCloseableIterator[T <: AutoCloseable, K] extends RmmRapidsRetryIterator[T, K]

    RmmRapidsRetryAutoCloseableIterator exposes an iterator that can retry work, specified by fn, abstracting away the retry specifics.

    RmmRapidsRetryAutoCloseableIterator exposes an iterator that can retry work, specified by fn, abstracting away the retry specifics. Elements passed to this iterator must be AutoCloseable.

    It assumes the type T is AutoCloseable, and that if a split policy is specified, that it is capable of handling splitting one T into a sequence of them.

    T

    element type that must be AutoCloseable

    K

    result type

  4. class RmmRapidsRetryIterator[T, K] extends Iterator[K]

    RmmRapidsRetryIterator exposes an iterator that can retry work, specified by fn, abstracting away the retry specifics.

    RmmRapidsRetryIterator exposes an iterator that can retry work, specified by fn, abstracting away the retry specifics.

    T

    element type

    K

    fn result type

  5. trait Spliterator[K] extends Iterator[K] with AutoCloseable

    A trait that defines an iterator of type K that supports two extra things: the ability to split its input, and the ability to close itself.

    A trait that defines an iterator of type K that supports two extra things: the ability to split its input, and the ability to close itself.

    Note that the input's type is not defined and is not relevant to this trait.

    K

    the resulting type

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  12. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  15. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  16. def logDebug(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  17. def logDebug(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  18. def logError(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  19. def logError(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  20. def logInfo(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  21. def logInfo(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  22. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  23. def logTrace(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  24. def logTrace(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  25. def logWarning(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  26. def logWarning(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  30. def splitSpillableInHalfByRows: (SpillableColumnarBatch) ⇒ Seq[SpillableColumnarBatch]

    Common split function from a single SpillableColumnarBatch to a sequence of them, that tries to split the input into two chunks.

    Common split function from a single SpillableColumnarBatch to a sequence of them, that tries to split the input into two chunks. If the input cannot be split in two, because we are down to 1 row, this function throws GpuSplitAndRetryOOM or CpuSplitAndRetryOOM.

    Note how this function closes the input spillable that is passed in.

    returns

    a Seq[SpillableColumnarBatch] with 2 elements.

  31. def splitTargetSizeInHalfCpu: (AutoCloseableTargetSize) ⇒ Seq[AutoCloseableTargetSize]

    A common split function for an AutoCloseableTargetSize, which just divides the target size in half, and creates a seq with just one element representing the new target size.

    A common split function for an AutoCloseableTargetSize, which just divides the target size in half, and creates a seq with just one element representing the new target size.

    returns

    a Seq[AutoCloseableTargetSize] with 1 element.

    Exceptions thrown

    CpuSplitAndRetryOOM if it reaches the split limit.

  32. def splitTargetSizeInHalfGpu: (AutoCloseableTargetSize) ⇒ Seq[AutoCloseableTargetSize]

    A common split function for an AutoCloseableTargetSize, which just divides the target size in half, and creates a seq with just one element representing the new target size.

    A common split function for an AutoCloseableTargetSize, which just divides the target size in half, and creates a seq with just one element representing the new target size.

    returns

    a Seq[AutoCloseableTargetSize] with 1 element.

    Exceptions thrown

    GpuSplitAndRetryOOM if it reaches the split limit.

  33. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  34. def toString(): String
    Definition Classes
    AnyRef → Any
  35. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  38. def withRestoreOnRetry[T <: Retryable, K](r: Seq[T])(fn: ⇒ K): K

    withRestoreOnRetry for Retryable.

    withRestoreOnRetry for Retryable. This helper function calls fn with no input and returns the result. In the event of an OOM Retry exception, it calls the restore() method of the input and then throws the oom exception. This is intended to be used within the fn of one of the withRetry* functions. It provides an opportunity to reset state in the case of a retry.

    T

    element type that must be a Retryable subclass

    K

    fn result type

    r

    a Seq of item T

    fn

    the work to perform. Takes no input and produces K

    returns

    a single item of type K

  39. def withRestoreOnRetry[T <: Retryable, K](r: T)(fn: ⇒ K): K

    withRestoreOnRetry for Retryable.

    withRestoreOnRetry for Retryable. This helper function calls fn with no input and returns the result. In the event of an OOM Retry exception, it calls the restore() method of the input and then throws the oom exception. This is intended to be used within the fn of one of the withRetry* functions. It provides an opportunity to reset state in the case of a retry.

    T

    element type that must be a Retryable subclass

    K

    fn result type

    r

    a single item T

    fn

    the work to perform. Takes no input and produces K

    returns

    a single item of type K

  40. def withRetry[T <: AutoCloseable, K](input: T, splitPolicy: (T) ⇒ Seq[T])(fn: (T) ⇒ K): Iterator[K]

    withRetry for T.

    withRetry for T. This helper calls a function fn with the single input T, and it can retry the work in fn and optionally split input into smaller chunks. The resulting iterator may be 1 element, if successful on the first attempt or retry, or it could be multiple if splits were required.

    While T is a generic AutoCloseable subclass most of the time we expect it to be SpillableColumnarBatch. The expectation when code enters withRetry is that all of the caller's data is spillable already, allowing the thread to be blocked, and its data eventually spilled because of other higher priority work.

    This function will close the elements of input as fn is successfully invoked. In the event of an unhandled exception input is also closed.

    fn must be idempotent: this is a requirement because we may call fn multiple times while handling retries.

    T

    element type that must be AutoCloseable (likely SpillableColumnarBatch)

    K

    fn result type

    input

    a single item T

    splitPolicy

    a function that can split an item of type T into a Seq[T]. The split function must close the item passed to it.

    fn

    the work to perform. Takes T and produces an output K

    returns

    an iterator of K

  41. def withRetry[T <: AutoCloseable, K](input: Iterator[T], splitPolicy: (T) ⇒ Seq[T])(fn: (T) ⇒ K): Iterator[K]

    withRetry for Iterator[T].

    withRetry for Iterator[T]. This helper calls a function fn as it takes elements from the iterator given in input, and it can retry the work in fn, and optionally split items into smaller chunks. The splitPolicy function must close the item passed to it. The resulting iterator may or may not have the same number of elements as the source iterator.

    While T is a generic AutoCloseable subclass most of the time we expect it to be SpillableColumnarBatch. The expectation when code enters withRetry is that all of the caller's data is spillable already, allowing the thread to be blocked, and its data eventually spilled because of other higher priority work.

    This function will close the elements of input as fn is successfully invoked. Elements of input not manifested are the responsibility of the caller to close!

    fn must be idempotent: this is a requirement because we may call fn multiple times while handling retries.

    T

    element type that must be AutoCloseable (likely SpillableColumnarBatch)

    K

    fn result type

    input

    an iterator of T

    splitPolicy

    a function that can split an item of type T into a Seq[T]. The split function must close the item passed to it.

    fn

    the work to perform. Takes T and produces an output K

    returns

    an iterator of K

  42. def withRetryNoSplit[K](fn: ⇒ K): K

    no-input withRetryNoSplit.

    no-input withRetryNoSplit. This helper calls a function fn retrying the call if needed. The result is a single item of type K.

    The expectation when code enters withRetryNoSplit is that all of the caller's data is spillable already, allowing the thread to be blocked, and its data eventually spilled because of other higher priority work.

    fn must be idempotent: this is a requirement because we may call fn multiple times while handling retries.

    K

    fn result type

    fn

    the work to perform. It is a function that takes nothing and produces K

    returns

    a single item of type K

  43. def withRetryNoSplit[T <: AutoCloseable, K](input: Seq[T])(fn: (Seq[T]) ⇒ K): K

    withRetryNoSplit for Seq[T].

    withRetryNoSplit for Seq[T]. This helper calls a function fn with the whole sequence given in input, and it will retry the call to fn if needed. This does not split the input into multiple chunks. The result is a single item of type K.

    While T is a generic AutoCloseable subclass most of the time we expect it to be SpillableColumnarBatch. The expectation when code enters withRetryNoSplit is that all of the caller's data is spillable already, allowing the thread to be blocked, and its data eventually spilled because of other higher priority work.

    This function will close the elements of input as fn is successfully invoked. In the event of an unhandled exception, all elements of input are closed.

    fn must be idempotent: this is a requirement because we may call fn multiple times while handling retries.

    T

    element type that must be AutoCloseable (likely SpillableColumnarBatch)

    K

    fn result type

    input

    a single item T

    fn

    the work to perform. Takes T and produces an output K

    returns

    a single item of type K

  44. def withRetryNoSplit[T <: AutoCloseable, K](input: T)(fn: (T) ⇒ K): K

    withRetryNoSplit for T.

    withRetryNoSplit for T. This helper calls a function fn with the input, and it will retry the call to fn if needed. This does not split the input into multiple chunks. The result is a single item of type K.

    While T is a generic AutoCloseable subclass most of the time we expect it to be SpillableColumnarBatch. The expectation when code enters withRetryNoSplit is that all of the caller's data is spillable already, allowing the thread to be blocked, and its data eventually spilled because of other higher priority work.

    This function will close the elements of input as fn is successfully invoked. In the event of an unhandled exception input is also closed.

    fn must be idempotent: this is a requirement because we may call fn multiple times while handling retries.

    T

    element type that must be AutoCloseable (likely SpillableColumnarBatch)

    K

    fn result type

    input

    a single item T

    fn

    the work to perform. Takes T and produces an output K

    returns

    a single item of type K

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped