pyarrow.plasma.PlasmaBuffer

class pyarrow.plasma.PlasmaBuffer

Bases: pyarrow.lib.Buffer

This is the type returned by calls to get with a PlasmaClient.

We define our own class instead of directly returning a buffer object so that we can add a custom destructor which notifies Plasma that the object is no longer being used, so the memory in the Plasma store backing the object can potentially be freed.

object_id

ObjectID – The ID of the object in the buffer.

client

PlasmaClient – The PlasmaClient that we use to communicate with the store and manager.

__init__()

Initialize self. See help(type(self)) for accurate signature.

Methods

equals(self, Buffer other) Determine if two buffers contain exactly the same data
slice(self[, offset, length]) Compute slice of this buffer
to_pybytes(self)

Attributes

address
is_mutable
parent
size
address
equals(self, Buffer other)

Determine if two buffers contain exactly the same data

Parameters:other (Buffer) –
Returns:are_equal (True if buffer contents and size are equal)
is_mutable
parent
size
slice(self, offset=0, length=None)

Compute slice of this buffer

Parameters:
  • offset (int, default 0) – Offset from start of buffer to slice
  • length (int, default None) – Length of slice (default is until end of Buffer starting from offset)
Returns:

sliced (Buffer)

to_pybytes(self)