Remove raylet client from Python worker (#6018)

This commit is contained in:
Edward Oakes
2020-01-31 18:23:01 -08:00
committed by GitHub
parent 341a921d81
commit 92525f35d1
14 changed files with 112 additions and 165 deletions
+12 -4
View File
@@ -12,6 +12,8 @@ from libcpp.vector cimport vector as c_vector
from ray.includes.unique_ids cimport (
CActorID,
CActorCheckpointID,
CClientID,
CJobID,
CTaskID,
CObjectID,
@@ -31,7 +33,6 @@ from ray.includes.common cimport (
CGcsClientOptions,
)
from ray.includes.task cimport CTaskSpec
from ray.includes.libraylet cimport CRayletClient
ctypedef unordered_map[c_string, c_vector[pair[int64_t, double]]] \
ResourceMappingType
@@ -107,9 +108,6 @@ cdef extern from "ray/core_worker/core_worker.h" nogil:
const c_vector[shared_ptr[CBuffer]] &metadatas,
c_vector[shared_ptr[CRayObject]] *return_objects)
# TODO(edoakes): remove this once the raylet client is no longer used
# directly.
CRayletClient &GetRayletClient()
CJobID GetCurrentJobId()
CTaskID GetCurrentTaskId()
const CActorID &GetActorId()
@@ -159,3 +157,13 @@ cdef extern from "ray/core_worker/core_worker.h" nogil:
ray_callback_function successs_callback,
ray_callback_function fallback_callback,
void* python_future)
CRayStatus PushError(const CJobID &job_id, const c_string &type,
const c_string &error_message, double timestamp)
CRayStatus PrepareActorCheckpoint(const CActorID &actor_id,
CActorCheckpointID *checkpoint_id)
CRayStatus NotifyActorResumedFromCheckpoint(
const CActorID &actor_id, const CActorCheckpointID &checkpoint_id)
CRayStatus SetResource(const c_string &resource_name,
const double capacity,
const CClientID &client_Id)