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.
- Alphabetic
- By Inheritance
- RapidsBufferCatalog
- Logging
- AutoCloseable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new RapidsBufferCatalog(deviceStorage: RapidsDeviceMemoryStore = RapidsBufferCatalog.deviceStorage, hostStorage: RapidsHostMemoryStore = RapidsBufferCatalog.hostStorage)
Type Members
- class RapidsBufferHandleImpl extends RapidsBufferHandle
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
-
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
-
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
-
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
-
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
-
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
-
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
addBuffershould 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
-
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
-
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
addContiguousTableshould 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
-
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
-
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
close(): Unit
- Definition Classes
- RapidsBufferCatalog → AutoCloseable
-
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] )
-
def
getBufferMeta(id: RapidsBufferId): TableMeta
Get the table metadata corresponding to a buffer ID.
-
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
-
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
-
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
-
def
makeNewHandle(id: RapidsBufferId, spillPriority: Long): RapidsBufferHandle
Makes a new
RapidsBufferHandleassociated withid, keeping track of the spill priority and callback within this handle.Makes a new
RapidsBufferHandleassociated withid, 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
RapidsBufferIdthat this handle refers to- spillPriority
the spill priority specified on creation of the handle
- returns
a new instance of
RapidsBufferHandle
- Note
public for testing
-
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
numBuffers: Int
Return the number of buffers currently in the catalog.
-
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
-
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
-
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
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
synchronousSpill(store: RapidsBufferStore, targetTotalSize: Long, stream: Stream = Cuda.DEFAULT_STREAM): Option[Long]
Free memory in
storeby spilling buffers to the spill store synchronously.Free memory in
storeby 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
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
unspillBufferToDeviceStore(buffer: RapidsBuffer, stream: Stream): RapidsBuffer
Copies
bufferto thedeviceStoragestore, registering a newRapidsBufferin the processCopies
bufferto thedeviceStoragestore, registering a newRapidsBufferin the process- buffer
- buffer to copy
- stream
- Cuda.Stream to synchronize on
- returns
- The
RapidsBufferinstance that was added to the device store.
-
def
unspillBufferToHostStore(buffer: RapidsBuffer, stream: Stream): RapidsBuffer
Copies
bufferto thehostStoragestore, registering a newRapidsBufferin the processCopies
bufferto thehostStoragestore, registering a newRapidsBufferin the process- buffer
- buffer to copy
- stream
- Cuda.Stream to synchronize on
- returns
- The
RapidsBufferinstance that was added to the host store.
- def updateTiers(bufferSpill: SpillAction): Long
-
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()