Apache Arrow (C++)
A columnar in-memory analytics layer designed to accelerate big data.
Classes | Typedefs | Enumerations | Functions | Variables
plasma Namespace Reference

Classes

struct  Client
 Contains all information that is associated with a Plasma store client. More...
 
struct  ClientMmapTableEntry
 
class  EventLoop
 
class  EvictionPolicy
 The eviction policy. More...
 
class  LRUCache
 
struct  NotificationQueue
 
struct  object_handle
 Handle to access memory mapped file and map it into client address space. More...
 
struct  ObjectBuffer
 Object buffer data structure. More...
 
struct  ObjectRequest
 Object request data structure. Used for Wait. More...
 
struct  ObjectTableEntry
 This type is used by the Plasma store. More...
 
class  PlasmaClient
 
struct  PlasmaClientConfig
 Configuration options for the plasma client. More...
 
struct  PlasmaObject
 
class  PlasmaStore
 
struct  PlasmaStoreInfo
 The plasma store information that is exposed to the eviction policy. More...
 
class  UniqueID
 
struct  UniqueIDHasher
 

Typedefs

typedef UniqueID ObjectID
 
typedef long long TimerID
 
typedef std::unordered_map< ObjectID, ObjectRequest, UniqueIDHasherObjectRequestMap
 Mapping from object IDs to type and status of the request. More...
 

Enumerations

enum  ObjectRequestType { PLASMA_QUERY_LOCAL = 1, PLASMA_QUERY_ANYWHERE }
 
enum  object_state { PLASMA_CREATED = 1, PLASMA_SEALED }
 
enum  object_status { OBJECT_NOT_FOUND = 0, OBJECT_FOUND = 1 }
 

Functions

arrow::Status plasma_error_status (int plasma_error)
 
Status WriteBytes (int fd, uint8_t *cursor, size_t length)
 
Status WriteMessage (int fd, int64_t type, int64_t length, uint8_t *bytes)
 
Status ReadBytes (int fd, uint8_t *cursor, size_t length)
 
Status ReadMessage (int fd, int64_t *type, std::vector< uint8_t > *buffer)
 
int bind_ipc_sock (const std::string &pathname, bool shall_listen)
 
int connect_ipc_sock (const std::string &pathname)
 
Status ConnectIpcSocketRetry (const std::string &pathname, int num_retries, int64_t timeout, int *fd)
 
int AcceptClient (int socket_fd)
 
uint8_t * read_message_async (int sock)
 
ObjectTableEntryget_object_table_entry (PlasmaStoreInfo *store_info, const ObjectID &object_id)
 Get an entry from the object table and return NULL if the object_id is not present. More...
 
int warn_if_sigpipe (int status, int client_sock)
 Print a warning if the status is less than zero. More...
 
uint8_t * create_object_info_buffer (ObjectInfoT *object_info)
 
template<class T >
bool verify_flatbuffer (T *object, uint8_t *data, size_t size)
 
Status PlasmaReceive (int sock, int64_t message_type, std::vector< uint8_t > *buffer)
 
Status SendCreateRequest (int sock, ObjectID object_id, int64_t data_size, int64_t metadata_size)
 
Status ReadCreateRequest (uint8_t *data, size_t size, ObjectID *object_id, int64_t *data_size, int64_t *metadata_size)
 
Status SendCreateReply (int sock, ObjectID object_id, PlasmaObject *object, int error)
 
Status ReadCreateReply (uint8_t *data, size_t size, ObjectID *object_id, PlasmaObject *object)
 
Status SendSealRequest (int sock, ObjectID object_id, unsigned char *digest)
 
Status ReadSealRequest (uint8_t *data, size_t size, ObjectID *object_id, unsigned char *digest)
 
Status SendSealReply (int sock, ObjectID object_id, int error)
 
Status ReadSealReply (uint8_t *data, size_t size, ObjectID *object_id)
 
Status SendGetRequest (int sock, const ObjectID *object_ids, int64_t num_objects, int64_t timeout_ms)
 
Status ReadGetRequest (uint8_t *data, size_t size, std::vector< ObjectID > &object_ids, int64_t *timeout_ms)
 
Status SendGetReply (int sock, ObjectID object_ids[], std::unordered_map< ObjectID, PlasmaObject, UniqueIDHasher > &plasma_objects, int64_t num_objects)
 
Status ReadGetReply (uint8_t *data, size_t size, ObjectID object_ids[], PlasmaObject plasma_objects[], int64_t num_objects)
 
Status SendReleaseRequest (int sock, ObjectID object_id)
 
Status ReadReleaseRequest (uint8_t *data, size_t size, ObjectID *object_id)
 
Status SendReleaseReply (int sock, ObjectID object_id, int error)
 
Status ReadReleaseReply (uint8_t *data, size_t size, ObjectID *object_id)
 
Status SendDeleteRequest (int sock, ObjectID object_id)
 
Status ReadDeleteRequest (uint8_t *data, size_t size, ObjectID *object_id)
 
Status SendDeleteReply (int sock, ObjectID object_id, int error)
 
Status ReadDeleteReply (uint8_t *data, size_t size, ObjectID *object_id)
 
Status SendStatusRequest (int sock, const ObjectID *object_ids, int64_t num_objects)
 
Status ReadStatusRequest (uint8_t *data, size_t size, ObjectID object_ids[], int64_t num_objects)
 
Status SendStatusReply (int sock, ObjectID object_ids[], int object_status[], int64_t num_objects)
 
int64_t ReadStatusReply_num_objects (uint8_t *data, size_t size)
 
Status ReadStatusReply (uint8_t *data, size_t size, ObjectID object_ids[], int object_status[], int64_t num_objects)
 
Status SendContainsRequest (int sock, ObjectID object_id)
 
Status ReadContainsRequest (uint8_t *data, size_t size, ObjectID *object_id)
 
Status SendContainsReply (int sock, ObjectID object_id, bool has_object)
 
Status ReadContainsReply (uint8_t *data, size_t size, ObjectID *object_id, bool *has_object)
 
Status SendConnectRequest (int sock)
 
Status ReadConnectRequest (uint8_t *data, size_t size)
 
Status SendConnectReply (int sock, int64_t memory_capacity)
 
Status ReadConnectReply (uint8_t *data, size_t size, int64_t *memory_capacity)
 
Status SendEvictRequest (int sock, int64_t num_bytes)
 
Status ReadEvictRequest (uint8_t *data, size_t size, int64_t *num_bytes)
 
Status SendEvictReply (int sock, int64_t num_bytes)
 
Status ReadEvictReply (uint8_t *data, size_t size, int64_t &num_bytes)
 
Status SendFetchRequest (int sock, const ObjectID *object_ids, int64_t num_objects)
 
Status ReadFetchRequest (uint8_t *data, size_t size, std::vector< ObjectID > &object_ids)
 
Status SendWaitRequest (int sock, ObjectRequest object_requests[], int64_t num_requests, int num_ready_objects, int64_t timeout_ms)
 
Status ReadWaitRequest (uint8_t *data, size_t size, ObjectRequestMap &object_requests, int64_t *timeout_ms, int *num_ready_objects)
 
Status SendWaitReply (int sock, const ObjectRequestMap &object_requests, int num_ready_objects)
 
Status ReadWaitReply (uint8_t *data, size_t size, ObjectRequest object_requests[], int *num_ready_objects)
 
Status SendSubscribeRequest (int sock)
 
Status SendDataRequest (int sock, ObjectID object_id, const char *address, int port)
 
Status ReadDataRequest (uint8_t *data, size_t size, ObjectID *object_id, char **address, int *port)
 
Status SendDataReply (int sock, ObjectID object_id, int64_t object_size, int64_t metadata_size)
 
Status ReadDataReply (uint8_t *data, size_t size, ObjectID *object_id, int64_t *object_size, int64_t *metadata_size)
 

Variables

constexpr int64_t kL3CacheSizeBytes = 100000000
 
constexpr int64_t kUniqueIDSize = 20
 
constexpr int64_t kDigestSize = sizeof(uint64_t)
 Size of object hash digests. More...
 
int ObjectStatusLocal
 
int ObjectStatusRemote
 
const PlasmaStoreInfoplasma_config
 
constexpr int kEventLoopTimerDone = AE_NOMORE
 Constant specifying that the timer is done and it will be removed. More...
 
constexpr int kEventLoopRead = AE_READABLE
 Read event on the file descriptor. More...
 
constexpr int kEventLoopWrite = AE_WRITABLE
 Write event on the file descriptor. More...
 

Typedef Documentation

◆ ObjectID

◆ ObjectRequestMap

Mapping from object IDs to type and status of the request.

◆ TimerID

typedef long long plasma::TimerID

Enumeration Type Documentation

◆ object_state

Enumerator
PLASMA_CREATED 

Object was created but not sealed in the local Plasma Store.

PLASMA_SEALED 

Object is sealed and stored in the local Plasma Store.

◆ object_status

Enumerator
OBJECT_NOT_FOUND 

The object was not found.

OBJECT_FOUND 

The object was found.

◆ ObjectRequestType

Enumerator
PLASMA_QUERY_LOCAL 

Query for object in the local plasma store.

PLASMA_QUERY_ANYWHERE 

Query for object in the local plasma store or in a remote plasma store.

Function Documentation

◆ AcceptClient()

int plasma::AcceptClient ( int  socket_fd)

◆ bind_ipc_sock()

int plasma::bind_ipc_sock ( const std::string &  pathname,
bool  shall_listen 
)

◆ connect_ipc_sock()

int plasma::connect_ipc_sock ( const std::string &  pathname)

◆ ConnectIpcSocketRetry()

Status plasma::ConnectIpcSocketRetry ( const std::string &  pathname,
int  num_retries,
int64_t  timeout,
int *  fd 
)

◆ create_object_info_buffer()

uint8_t* plasma::create_object_info_buffer ( ObjectInfoT *  object_info)

◆ get_object_table_entry()

ObjectTableEntry* plasma::get_object_table_entry ( PlasmaStoreInfo store_info,
const ObjectID object_id 
)

Get an entry from the object table and return NULL if the object_id is not present.

Parameters
store_infoThe PlasmaStoreInfo that contains the object table.
object_idThe object_id of the entry we are looking for.
Returns
The entry associated with the object_id or NULL if the object_id is not present.

◆ plasma_error_status()

arrow::Status plasma::plasma_error_status ( int  plasma_error)

◆ PlasmaReceive()

Status plasma::PlasmaReceive ( int  sock,
int64_t  message_type,
std::vector< uint8_t > *  buffer 
)

◆ read_message_async()

uint8_t* plasma::read_message_async ( int  sock)

◆ ReadBytes()

Status plasma::ReadBytes ( int  fd,
uint8_t *  cursor,
size_t  length 
)

◆ ReadConnectReply()

Status plasma::ReadConnectReply ( uint8_t *  data,
size_t  size,
int64_t *  memory_capacity 
)

◆ ReadConnectRequest()

Status plasma::ReadConnectRequest ( uint8_t *  data,
size_t  size 
)

◆ ReadContainsReply()

Status plasma::ReadContainsReply ( uint8_t *  data,
size_t  size,
ObjectID object_id,
bool *  has_object 
)

◆ ReadContainsRequest()

Status plasma::ReadContainsRequest ( uint8_t *  data,
size_t  size,
ObjectID object_id 
)

◆ ReadCreateReply()

Status plasma::ReadCreateReply ( uint8_t *  data,
size_t  size,
ObjectID object_id,
PlasmaObject object 
)

◆ ReadCreateRequest()

Status plasma::ReadCreateRequest ( uint8_t *  data,
size_t  size,
ObjectID object_id,
int64_t *  data_size,
int64_t *  metadata_size 
)

◆ ReadDataReply()

Status plasma::ReadDataReply ( uint8_t *  data,
size_t  size,
ObjectID object_id,
int64_t *  object_size,
int64_t *  metadata_size 
)

◆ ReadDataRequest()

Status plasma::ReadDataRequest ( uint8_t *  data,
size_t  size,
ObjectID object_id,
char **  address,
int *  port 
)

◆ ReadDeleteReply()

Status plasma::ReadDeleteReply ( uint8_t *  data,
size_t  size,
ObjectID object_id 
)

◆ ReadDeleteRequest()

Status plasma::ReadDeleteRequest ( uint8_t *  data,
size_t  size,
ObjectID object_id 
)

◆ ReadEvictReply()

Status plasma::ReadEvictReply ( uint8_t *  data,
size_t  size,
int64_t &  num_bytes 
)

◆ ReadEvictRequest()

Status plasma::ReadEvictRequest ( uint8_t *  data,
size_t  size,
int64_t *  num_bytes 
)

◆ ReadFetchRequest()

Status plasma::ReadFetchRequest ( uint8_t *  data,
size_t  size,
std::vector< ObjectID > &  object_ids 
)

◆ ReadGetReply()

Status plasma::ReadGetReply ( uint8_t *  data,
size_t  size,
ObjectID  object_ids[],
PlasmaObject  plasma_objects[],
int64_t  num_objects 
)

◆ ReadGetRequest()

Status plasma::ReadGetRequest ( uint8_t *  data,
size_t  size,
std::vector< ObjectID > &  object_ids,
int64_t *  timeout_ms 
)

◆ ReadMessage()

Status plasma::ReadMessage ( int  fd,
int64_t *  type,
std::vector< uint8_t > *  buffer 
)

◆ ReadReleaseReply()

Status plasma::ReadReleaseReply ( uint8_t *  data,
size_t  size,
ObjectID object_id 
)

◆ ReadReleaseRequest()

Status plasma::ReadReleaseRequest ( uint8_t *  data,
size_t  size,
ObjectID object_id 
)

◆ ReadSealReply()

Status plasma::ReadSealReply ( uint8_t *  data,
size_t  size,
ObjectID object_id 
)

◆ ReadSealRequest()

Status plasma::ReadSealRequest ( uint8_t *  data,
size_t  size,
ObjectID object_id,
unsigned char *  digest 
)

◆ ReadStatusReply()

Status plasma::ReadStatusReply ( uint8_t *  data,
size_t  size,
ObjectID  object_ids[],
int  object_status[],
int64_t  num_objects 
)

◆ ReadStatusReply_num_objects()

int64_t plasma::ReadStatusReply_num_objects ( uint8_t *  data,
size_t  size 
)

◆ ReadStatusRequest()

Status plasma::ReadStatusRequest ( uint8_t *  data,
size_t  size,
ObjectID  object_ids[],
int64_t  num_objects 
)

◆ ReadWaitReply()

Status plasma::ReadWaitReply ( uint8_t *  data,
size_t  size,
ObjectRequest  object_requests[],
int *  num_ready_objects 
)

◆ ReadWaitRequest()

Status plasma::ReadWaitRequest ( uint8_t *  data,
size_t  size,
ObjectRequestMap object_requests,
int64_t *  timeout_ms,
int *  num_ready_objects 
)

◆ SendConnectReply()

Status plasma::SendConnectReply ( int  sock,
int64_t  memory_capacity 
)

◆ SendConnectRequest()

Status plasma::SendConnectRequest ( int  sock)

◆ SendContainsReply()

Status plasma::SendContainsReply ( int  sock,
ObjectID  object_id,
bool  has_object 
)

◆ SendContainsRequest()

Status plasma::SendContainsRequest ( int  sock,
ObjectID  object_id 
)

◆ SendCreateReply()

Status plasma::SendCreateReply ( int  sock,
ObjectID  object_id,
PlasmaObject object,
int  error 
)

◆ SendCreateRequest()

Status plasma::SendCreateRequest ( int  sock,
ObjectID  object_id,
int64_t  data_size,
int64_t  metadata_size 
)

◆ SendDataReply()

Status plasma::SendDataReply ( int  sock,
ObjectID  object_id,
int64_t  object_size,
int64_t  metadata_size 
)

◆ SendDataRequest()

Status plasma::SendDataRequest ( int  sock,
ObjectID  object_id,
const char *  address,
int  port 
)

◆ SendDeleteReply()

Status plasma::SendDeleteReply ( int  sock,
ObjectID  object_id,
int  error 
)

◆ SendDeleteRequest()

Status plasma::SendDeleteRequest ( int  sock,
ObjectID  object_id 
)

◆ SendEvictReply()

Status plasma::SendEvictReply ( int  sock,
int64_t  num_bytes 
)

◆ SendEvictRequest()

Status plasma::SendEvictRequest ( int  sock,
int64_t  num_bytes 
)

◆ SendFetchRequest()

Status plasma::SendFetchRequest ( int  sock,
const ObjectID object_ids,
int64_t  num_objects 
)

◆ SendGetReply()

Status plasma::SendGetReply ( int  sock,
ObjectID  object_ids[],
std::unordered_map< ObjectID, PlasmaObject, UniqueIDHasher > &  plasma_objects,
int64_t  num_objects 
)

◆ SendGetRequest()

Status plasma::SendGetRequest ( int  sock,
const ObjectID object_ids,
int64_t  num_objects,
int64_t  timeout_ms 
)

◆ SendReleaseReply()

Status plasma::SendReleaseReply ( int  sock,
ObjectID  object_id,
int  error 
)

◆ SendReleaseRequest()

Status plasma::SendReleaseRequest ( int  sock,
ObjectID  object_id 
)

◆ SendSealReply()

Status plasma::SendSealReply ( int  sock,
ObjectID  object_id,
int  error 
)

◆ SendSealRequest()

Status plasma::SendSealRequest ( int  sock,
ObjectID  object_id,
unsigned char *  digest 
)

◆ SendStatusReply()

Status plasma::SendStatusReply ( int  sock,
ObjectID  object_ids[],
int  object_status[],
int64_t  num_objects 
)

◆ SendStatusRequest()

Status plasma::SendStatusRequest ( int  sock,
const ObjectID object_ids,
int64_t  num_objects 
)

◆ SendSubscribeRequest()

Status plasma::SendSubscribeRequest ( int  sock)

◆ SendWaitReply()

Status plasma::SendWaitReply ( int  sock,
const ObjectRequestMap object_requests,
int  num_ready_objects 
)

◆ SendWaitRequest()

Status plasma::SendWaitRequest ( int  sock,
ObjectRequest  object_requests[],
int64_t  num_requests,
int  num_ready_objects,
int64_t  timeout_ms 
)

◆ verify_flatbuffer()

template<class T >
bool plasma::verify_flatbuffer ( T *  object,
uint8_t *  data,
size_t  size 
)

◆ warn_if_sigpipe()

int plasma::warn_if_sigpipe ( int  status,
int  client_sock 
)

Print a warning if the status is less than zero.

This should be used to check the success of messages sent to plasma clients. We print a warning instead of failing because the plasma clients are allowed to die. This is used to handle situations where the store writes to a client file descriptor, and the client may already have disconnected. If we have processed the disconnection and closed the file descriptor, we should get a BAD FILE DESCRIPTOR error. If we have not, then we should get a SIGPIPE. If we write to a TCP socket that isn't connected yet, then we should get an ECONNRESET.

Parameters
statusThe status to check. If it is less less than zero, we will print a warning.
client_sockThe client socket. This is just used to print some extra information.
Returns
The errno set.

◆ WriteBytes()

Status plasma::WriteBytes ( int  fd,
uint8_t *  cursor,
size_t  length 
)

◆ WriteMessage()

Status plasma::WriteMessage ( int  fd,
int64_t  type,
int64_t  length,
uint8_t *  bytes 
)

Variable Documentation

◆ kDigestSize

constexpr int64_t plasma::kDigestSize = sizeof(uint64_t)

Size of object hash digests.

◆ kEventLoopRead

constexpr int plasma::kEventLoopRead = AE_READABLE

Read event on the file descriptor.

◆ kEventLoopTimerDone

constexpr int plasma::kEventLoopTimerDone = AE_NOMORE

Constant specifying that the timer is done and it will be removed.

◆ kEventLoopWrite

constexpr int plasma::kEventLoopWrite = AE_WRITABLE

Write event on the file descriptor.

◆ kL3CacheSizeBytes

constexpr int64_t plasma::kL3CacheSizeBytes = 100000000

◆ kUniqueIDSize

constexpr int64_t plasma::kUniqueIDSize = 20

◆ ObjectStatusLocal

int plasma::ObjectStatusLocal

◆ ObjectStatusRemote

int plasma::ObjectStatusRemote

◆ plasma_config

const PlasmaStoreInfo* plasma::plasma_config