mirror of
https://github.com/wassname/ray.git
synced 2026-07-19 11:27:32 +08:00
Use flatbuffers for some messages from Redis. (#341)
* Compile the Ray redis module with C++. * Redo parsing of object table notifications with flatbuffers. * Update redis module python tests. * Redo parsing of task table notifications with flatbuffers. * Fix linting. * Redo parsing of db client notifications with flatbuffers. * Redo publishing of local scheduler heartbeats with flatbuffers. * Fix linting. * Remove usage of fixed-width formatting of scheduling state in channel name. * Reply with flatbuffer object to task table queries, also simplify redis string to flatbuffer string conversion. * Fix linting and tests. * fix * cleanup * simplify logic in ReplyWithTask
This commit is contained in:
committed by
Philipp Moritz
parent
555dcf35a2
commit
53dffe0bf2
@@ -50,3 +50,62 @@ table TaskInfo {
|
||||
}
|
||||
|
||||
root_type TaskInfo;
|
||||
|
||||
table SubscribeToNotificationsReply {
|
||||
// The object ID of the object that the notification is about.
|
||||
object_id: string;
|
||||
// The size of the object.
|
||||
object_size: long;
|
||||
// The IDs of the managers that contain this object.
|
||||
manager_ids: [string];
|
||||
}
|
||||
|
||||
root_type SubscribeToNotificationsReply;
|
||||
|
||||
table TaskReply {
|
||||
// The task ID of the task that the message is about.
|
||||
task_id: string;
|
||||
// The state of the task. This is encoded as a bit mask of scheduling_state
|
||||
// enum values in task.h.
|
||||
state: long;
|
||||
// A local scheduler ID.
|
||||
local_scheduler_id: string;
|
||||
// A string of bytes representing the task specification.
|
||||
task_spec: string;
|
||||
}
|
||||
|
||||
root_type TaskReply;
|
||||
|
||||
table SubscribeToDBClientTableReply {
|
||||
// The db client ID of the client that the message is about.
|
||||
db_client_id: string;
|
||||
// The type of the client.
|
||||
client_type: string;
|
||||
// If the client is a local scheduler, this is the address of the plasma
|
||||
// manager that the local scheduler is connected to. Otherwise, it is empty.
|
||||
aux_address: string;
|
||||
// True if the message is about the addition of a client and false if it is
|
||||
// about the deletion of a client.
|
||||
is_insertion: bool;
|
||||
}
|
||||
|
||||
root_type SubscribeToDBClientTableReply;
|
||||
|
||||
table LocalSchedulerInfoMessage {
|
||||
// The db client ID of the client that the message is about.
|
||||
db_client_id: string;
|
||||
// The total number of workers that are connected to this local scheduler.
|
||||
total_num_workers: long;
|
||||
// The number of tasks queued in this local scheduler.
|
||||
task_queue_length: long;
|
||||
// The number of workers that are available and waiting for tasks.
|
||||
available_workers: long;
|
||||
// The resource vector of resources generally available to this local
|
||||
// scheduler.
|
||||
static_resources: [double];
|
||||
// The resource vector of resources currently available to this local
|
||||
// scheduler.
|
||||
dynamic_resources: [double];
|
||||
}
|
||||
|
||||
root_type LocalSchedulerInfoMessage;
|
||||
|
||||
Reference in New Issue
Block a user