object RmmRapidsRetryIterator extends Logging
- Alphabetic
- By Inheritance
- RmmRapidsRetryIterator
- Logging
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
class
AutoCloseableAttemptSpliterator[T <: AutoCloseable, K] extends Spliterator[K]
A spliterator that takes an input iterator of auto closeable T, and a function
fnthat can mapTtoK, with an additionalsplitPolicythat can splitTinto aSeq[T]A spliterator that takes an input iterator of auto closeable T, and a function
fnthat can mapTtoK, with an additionalsplitPolicythat can splitTinto aSeq[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
fnis successful, the item T ininputwill 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 ininputthat have not been attempted.fnmust be idempotent: this is a requirement because we may callfnmultiple times while handling retries.- T
element type that must be AutoCloseable
- K
fnresult type
-
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
fnonce onnext.- K
the resulting type
-
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
-
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
fnresult type
-
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
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
initializeLogIfNecessary(isInterpreter: Boolean): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isTraceEnabled(): Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
log: Logger
- Attributes
- protected
- Definition Classes
- Logging
-
def
logDebug(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logDebug(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logError(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logError(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logInfo(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logInfo(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logName: String
- Attributes
- protected
- Definition Classes
- Logging
-
def
logTrace(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logTrace(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logWarning(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logWarning(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
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
GpuSplitAndRetryOOMorCpuSplitAndRetryOOM.Note how this function closes the input
spillablethat is passed in.- returns
a Seq[SpillableColumnarBatch] with 2 elements.
-
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
CpuSplitAndRetryOOMif it reaches the split limit.
-
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
GpuSplitAndRetryOOMif it reaches the split limit.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
withRestoreOnRetry[T <: Retryable, K](r: Seq[T])(fn: ⇒ K): K
withRestoreOnRetry for Retryable.
withRestoreOnRetry for Retryable. This helper function calls
fnwith 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 thefnof 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
Retryablesubclass- K
fnresult 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
-
def
withRestoreOnRetry[T <: Retryable, K](r: T)(fn: ⇒ K): K
withRestoreOnRetry for Retryable.
withRestoreOnRetry for Retryable. This helper function calls
fnwith 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 thefnof 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
Retryablesubclass- K
fnresult type- r
a single item T
- fn
the work to perform. Takes no input and produces K
- returns
a single item of type K
-
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
fnwith the single inputT, and it can retry the work infnand optionally splitinputinto 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
AutoCloseablesubclass most of the time we expect it to beSpillableColumnarBatch. The expectation when code enterswithRetryis 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
inputasfnis successfully invoked. In the event of an unhandled exceptioninputis also closed.fnmust be idempotent: this is a requirement because we may callfnmultiple times while handling retries.- T
element type that must be AutoCloseable (likely
SpillableColumnarBatch)- K
fnresult 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
-
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
fnas it takes elements from the iterator given ininput, and it can retry the work infn, and optionally split items into smaller chunks. ThesplitPolicyfunction 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
AutoCloseablesubclass most of the time we expect it to beSpillableColumnarBatch. The expectation when code enterswithRetryis 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
inputasfnis successfully invoked. Elements ofinputnot manifested are the responsibility of the caller to close!fnmust be idempotent: this is a requirement because we may callfnmultiple times while handling retries.- T
element type that must be AutoCloseable (likely
SpillableColumnarBatch)- K
fnresult 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
-
def
withRetryNoSplit[K](fn: ⇒ K): K
no-input withRetryNoSplit.
no-input withRetryNoSplit. This helper calls a function
fnretrying the call if needed. The result is a single item of type K.The expectation when code enters
withRetryNoSplitis 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.fnmust be idempotent: this is a requirement because we may callfnmultiple times while handling retries.- K
fnresult type- fn
the work to perform. It is a function that takes nothing and produces K
- returns
a single item of type K
-
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
fnwith the whole sequence given ininput, and it will retry the call tofnif needed. This does not split the input into multiple chunks. The result is a single item of type K.While T is a generic
AutoCloseablesubclass most of the time we expect it to beSpillableColumnarBatch. The expectation when code enterswithRetryNoSplitis 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
inputasfnis successfully invoked. In the event of an unhandled exception, all elements ofinputare closed.fnmust be idempotent: this is a requirement because we may callfnmultiple times while handling retries.- T
element type that must be AutoCloseable (likely
SpillableColumnarBatch)- K
fnresult 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
-
def
withRetryNoSplit[T <: AutoCloseable, K](input: T)(fn: (T) ⇒ K): K
withRetryNoSplit for T.
withRetryNoSplit for T. This helper calls a function
fnwith theinput, and it will retry the call tofnif needed. This does not split the input into multiple chunks. The result is a single item of type K.While T is a generic
AutoCloseablesubclass most of the time we expect it to beSpillableColumnarBatch. The expectation when code enterswithRetryNoSplitis 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
inputasfnis successfully invoked. In the event of an unhandled exceptioninputis also closed.fnmust be idempotent: this is a requirement because we may callfnmultiple times while handling retries.- T
element type that must be AutoCloseable (likely
SpillableColumnarBatch)- K
fnresult 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