Packages

class RapidsBufferCatalog extends AutoCloseable with Logging

Catalog for lookup of buffers by ID. The constructor is only visible for testing, generally RapidsBufferCatalog.singleton should be used instead.

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

Instance Constructors

  1. new RapidsBufferCatalog(deviceStorage: RapidsDeviceMemoryStore = RapidsBufferCatalog.deviceStorage, hostStorage: RapidsHostMemoryStore = RapidsBufferCatalog.hostStorage)

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. def acquireBuffer(id: RapidsBufferId, tier: StorageTier): Option[RapidsBuffer]

    Lookup the buffer that corresponds to the specified buffer ID at the specified storage tier, and acquire it.

    Lookup the buffer that corresponds to the specified buffer ID at the specified storage tier, and acquire it. NOTE: It is the responsibility of the caller to close the buffer.

    id

    buffer identifier

    returns

    buffer that has been acquired, None if not found

  5. def acquireBuffer(handle: RapidsBufferHandle): RapidsBuffer

    Lookup the buffer that corresponds to the specified handle at the highest storage tier, and acquire it.

    Lookup the buffer that corresponds to the specified handle at the highest storage tier, and acquire it. NOTE: It is the responsibility of the caller to close the buffer.

    handle

    handle associated with this RapidsBuffer

    returns

    buffer that has been acquired

  6. def acquireHostBatchBuffer(handle: RapidsBufferHandle): RapidsHostBatchBuffer

    Acquires a RapidsBuffer that the caller expects to be host-backed and not device bound.

    Acquires a RapidsBuffer that the caller expects to be host-backed and not device bound. This ensures that the buffer acquired implements the correct trait, otherwise it throws and removes its buffer acquisition.

    handle

    handle associated with this RapidsBuffer

    returns

    host-backed RapidsBuffer that has been acquired

  7. def addBatch(batch: ColumnarBatch, initialSpillPriority: Long, needsSync: Boolean = true): RapidsBufferHandle

    Adds a batch to the device storage.

    Adds a batch to the device storage. This does NOT take ownership of the batch, so it is the responsibility of the caller to close it.

    batch

    batch that will be added to the store

    initialSpillPriority

    starting spill priority value for the batch

    needsSync

    whether the spill framework should stream synchronize while adding this batch (defaults to true)

    returns

    RapidsBufferHandle handle for this RapidsBuffer

  8. def addBuffer(id: RapidsBufferId, buffer: MemoryBuffer, tableMeta: TableMeta, initialSpillPriority: Long, needsSync: Boolean): RapidsBufferHandle

    Adds a buffer to either the device or host storage.

    Adds a buffer to either the device or host storage. This does NOT take ownership of the buffer, so it is the responsibility of the caller to close it.

    id

    the RapidsBufferId to use for this buffer

    buffer

    buffer that will be owned by the target store

    tableMeta

    metadata describing the buffer layout

    initialSpillPriority

    starting spill priority value for the buffer

    needsSync

    whether the spill framework should stream synchronize while adding this buffer (defaults to true)

    returns

    RapidsBufferHandle handle for this RapidsBuffer

  9. def addBuffer(buffer: MemoryBuffer, tableMeta: TableMeta, initialSpillPriority: Long, needsSync: Boolean = true): RapidsBufferHandle

    Adds a buffer to the catalog and store.

    Adds a buffer to the catalog and store. This does NOT take ownership of the buffer, so it is the responsibility of the caller to close it.

    This version of addBuffer should not be called from the shuffle catalogs since they provide their own ids.

    buffer

    buffer that will be owned by the store

    tableMeta

    metadata describing the buffer layout

    initialSpillPriority

    starting spill priority value for the buffer

    needsSync

    whether the spill framework should stream synchronize while adding this device buffer (defaults to true)

    returns

    RapidsBufferHandle handle for this buffer

  10. def addContiguousTable(id: RapidsBufferId, contigTable: ContiguousTable, initialSpillPriority: Long, needsSync: Boolean): RapidsBufferHandle

    Adds a contiguous table to the device storage.

    Adds a contiguous table to the device storage. This does NOT take ownership of the contiguous table, so it is the responsibility of the caller to close it. The refcount of the underlying device buffer will be incremented so the contiguous table can be closed before this buffer is destroyed.

    id

    the RapidsBufferId to use for this buffer

    contigTable

    contiguous table to track in storage

    initialSpillPriority

    starting spill priority value for the buffer

    needsSync

    whether the spill framework should stream synchronize while adding this device buffer (defaults to true)

    returns

    RapidsBufferHandle handle for this table

  11. def addContiguousTable(contigTable: ContiguousTable, initialSpillPriority: Long, needsSync: Boolean = true): RapidsBufferHandle

    Adds a contiguous table to the device storage.

    Adds a contiguous table to the device storage. This does NOT take ownership of the contiguous table, so it is the responsibility of the caller to close it. The refcount of the underlying device buffer will be incremented so the contiguous table can be closed before this buffer is destroyed.

    This version of addContiguousTable should not be called from the shuffle catalogs since they provide their own ids.

    contigTable

    contiguous table to track in storage

    initialSpillPriority

    starting spill priority value for the buffer

    needsSync

    whether the spill framework should stream synchronize while adding this device buffer (defaults to true)

    returns

    RapidsBufferHandle handle for this table

  12. def addTable(id: RapidsBufferId, table: Table, initialSpillPriority: Long, needsSync: Boolean): RapidsBufferHandle

    Adds a table to the device storage.

    Adds a table to the device storage.

    This takes ownership of the table. The reason for this is that tables don't have a reference count, so we cannot cleanly capture ownership by increasing ref count and decreasing from the caller.

    id

    specific RapidsBufferId to use for this table

    table

    table that will be owned by the store

    initialSpillPriority

    starting spill priority value

    needsSync

    whether the spill framework should stream synchronize while adding this table (defaults to true)

    returns

    RapidsBufferHandle handle for this RapidsBuffer

  13. def addTable(table: Table, initialSpillPriority: Long, needsSync: Boolean = true): RapidsBufferHandle

    Adds a table to the device storage.

    Adds a table to the device storage.

    This takes ownership of the table. The reason for this is that tables don't have a reference count, so we cannot cleanly capture ownership by increasing ref count and decreasing from the caller.

    table

    table that will be owned by the store

    initialSpillPriority

    starting spill priority value

    needsSync

    whether the spill framework should stream synchronize while adding this table (defaults to true)

    returns

    RapidsBufferHandle handle for this RapidsBuffer

  14. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  15. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  16. def close(): Unit
    Definition Classes
    RapidsBufferCatalog → AutoCloseable
  17. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  19. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. def getBufferMeta(id: RapidsBufferId): TableMeta

    Get the table metadata corresponding to a buffer ID.

  21. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  23. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  24. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  25. def isBufferSpilled(id: RapidsBufferId, tier: StorageTier): Boolean

    Check if the buffer that corresponds to the specified buffer ID is stored in a slower storage tier.

    Check if the buffer that corresponds to the specified buffer ID is stored in a slower storage tier.

    id

    buffer identifier

    tier

    storage tier to check

    returns

    true if the buffer is stored in multiple tiers

    Note

    public for testing

  26. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  27. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  28. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  29. def logDebug(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  30. def logDebug(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  31. def logError(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  32. def logError(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  33. def logInfo(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  34. def logInfo(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  35. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  36. def logTrace(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  37. def logTrace(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  38. def logWarning(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  39. def logWarning(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  40. def makeNewHandle(id: RapidsBufferId, spillPriority: Long): RapidsBufferHandle

    Makes a new RapidsBufferHandle associated with id, keeping track of the spill priority and callback within this handle.

    Makes a new RapidsBufferHandle associated with id, keeping track of the spill priority and callback within this handle.

    This function also adds the handle for internal tracking in the catalog.

    id

    the RapidsBufferId that this handle refers to

    spillPriority

    the spill priority specified on creation of the handle

    returns

    a new instance of RapidsBufferHandle

    Note

    public for testing

  41. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  42. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  43. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  44. def numBuffers: Int

    Return the number of buffers currently in the catalog.

  45. def registerDegenerateBuffer(bufferId: RapidsBufferId, meta: TableMeta): RapidsBufferHandle

    Register a degenerate RapidsBufferId given a TableMeta

    Register a degenerate RapidsBufferId given a TableMeta

    Note

    this is called from the shuffle catalogs only

  46. def registerNewBuffer(buffer: RapidsBuffer): Unit

    Register a new buffer with the catalog.

    Register a new buffer with the catalog. An exception will be thrown if an existing buffer was registered with the same buffer ID and storage tier.

    Note

    public for testing

  47. def removeBufferTier(id: RapidsBufferId, tier: StorageTier): Unit

    Remove a buffer ID from the catalog at the specified storage tier.

    Remove a buffer ID from the catalog at the specified storage tier.

    Note

    public for testing

  48. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  49. def synchronousSpill(store: RapidsBufferStore, targetTotalSize: Long, stream: Stream = Cuda.DEFAULT_STREAM): Option[Long]

    Free memory in store by spilling buffers to the spill store synchronously.

    Free memory in store by spilling buffers to the spill store synchronously.

    store

    store to spill from

    targetTotalSize

    maximum total size of this store after spilling completes

    stream

    CUDA stream to use or omit for default stream

    returns

    optionally number of bytes that were spilled, or None if this call made no attempt to spill due to a detected spill race

  50. def toString(): String
    Definition Classes
    AnyRef → Any
  51. def unspillBufferToDeviceStore(buffer: RapidsBuffer, stream: Stream): RapidsBuffer

    Copies buffer to the deviceStorage store, registering a new RapidsBuffer in the process

    Copies buffer to the deviceStorage store, registering a new RapidsBuffer in the process

    buffer

    - buffer to copy

    stream

    - Cuda.Stream to synchronize on

    returns

    - The RapidsBuffer instance that was added to the device store.

  52. def unspillBufferToHostStore(buffer: RapidsBuffer, stream: Stream): RapidsBuffer

    Copies buffer to the hostStorage store, registering a new RapidsBuffer in the process

    Copies buffer to the hostStorage store, registering a new RapidsBuffer in the process

    buffer

    - buffer to copy

    stream

    - Cuda.Stream to synchronize on

    returns

    - The RapidsBuffer instance that was added to the host store.

  53. def updateTiers(bufferSpill: SpillAction): Long
  54. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  55. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from Logging

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Ungrouped