[gRPC] Migrate raylet client implementation to grpc (#5120)

This commit is contained in:
Joey Jiang
2019-07-25 14:48:56 +08:00
committed by Hao Chen
parent 60f59639c1
commit 40395acadf
53 changed files with 1698 additions and 1156 deletions
+5 -5
View File
@@ -88,16 +88,16 @@ cdef extern from "ray/common/id.h" namespace "ray" nogil:
cdef extern from "ray/protobuf/common.pb.h" nogil:
cdef cppclass CLanguage "Language":
cdef cppclass CLanguage "ray::rpc::Language":
pass
# This is a workaround for C++ enum class since Cython has no corresponding
# representation.
cdef extern from "ray/protobuf/common.pb.h" namespace "Language" nogil:
cdef CLanguage LANGUAGE_PYTHON "Language::PYTHON"
cdef CLanguage LANGUAGE_CPP "Language::CPP"
cdef CLanguage LANGUAGE_JAVA "Language::JAVA"
cdef extern from "ray/protobuf/common.pb.h" namespace "ray::rpc::Language" nogil:
cdef CLanguage LANGUAGE_PYTHON "ray::rpc::Language::PYTHON"
cdef CLanguage LANGUAGE_CPP "ray::rpc::Language::CPP"
cdef CLanguage LANGUAGE_JAVA "ray::rpc::Language::JAVA"
cdef extern from "ray/common/task/scheduling_resources.h" \
+7 -7
View File
@@ -23,14 +23,14 @@ from ray.includes.task cimport CTaskSpec
cdef extern from "ray/protobuf/gcs.pb.h" nogil:
cdef cppclass GCSProfileEvent "ProfileTableData::ProfileEvent":
cdef cppclass GCSProfileEvent "ray::rpc::ProfileTableData::ProfileEvent":
void set_event_type(const c_string &value)
void set_start_time(double value)
void set_end_time(double value)
c_string set_extra_data(const c_string &value)
GCSProfileEvent()
cdef cppclass GCSProfileTableData "ProfileTableData":
cdef cppclass GCSProfileTableData "ray::rpc::ProfileTableData":
void set_component_type(const c_string &value)
void set_component_id(const c_string &value)
void set_node_ip_address(const c_string &value)
@@ -43,13 +43,12 @@ ctypedef unordered_map[c_string, c_vector[pair[int64_t, double]]] \
ctypedef pair[c_vector[CObjectID], c_vector[CObjectID]] WaitResultPair
cdef extern from "ray/raylet/raylet_client.h" nogil:
cdef cppclass CRayletClient "RayletClient":
cdef extern from "ray/rpc/raylet/raylet_client.h" namespace "ray::rpc" nogil:
cdef cppclass CRayletClient "ray::rpc::RayletClient":
CRayletClient(const c_string &raylet_socket,
const CClientID &client_id,
const CWorkerID &worker_id,
c_bool is_worker, const CJobID &job_id,
const CLanguage &language)
CRayStatus Disconnect()
CRayStatus SubmitTask(const CTaskSpec &task_spec)
CRayStatus GetTask(unique_ptr[CTaskSpec] *task_spec)
CRayStatus TaskDone()
@@ -73,7 +72,8 @@ cdef extern from "ray/raylet/raylet_client.h" nogil:
const CActorID &actor_id, const CActorCheckpointID &checkpoint_id)
CRayStatus SetResource(const c_string &resource_name, const double capacity, const CClientID &client_Id)
CLanguage GetLanguage() const
CClientID GetClientID() const
CWorkerID GetWorkerId() const
CJobID GetJobID() const
c_bool IsWorker() const
CRayStatus Disconnect()
const ResourceMappingType &GetResourceIDs() const