Handle exchange of direct call objects between tasks and actors (#6147)

This commit is contained in:
Eric Liang
2019-11-14 17:32:04 -08:00
committed by GitHub
parent 385783fcec
commit 8ff393a7bd
23 changed files with 426 additions and 202 deletions
+1
View File
@@ -104,6 +104,7 @@ cdef extern from "ray/core_worker/core_worker.h" nogil:
*bytes)
void AddObjectIDReference(const CObjectID &object_id)
void RemoveObjectIDReference(const CObjectID &object_id)
void PromoteObjectToPlasma(const CObjectID &object_id)
CRayStatus SetClientOptions(c_string client_name, int64_t limit)
CRayStatus Put(const CRayObject &object, CObjectID *object_id)
+3 -1
View File
@@ -95,8 +95,10 @@ cdef class TaskSpec:
:self.task_spec.get().ArgMetadataSize(i)]
if metadata == RAW_BUFFER_METADATA:
obj = data
else:
elif metadata == PICKLE_BUFFER_METADATA:
obj = pickle.loads(data)
else:
obj = data
arg_list.append(obj)
elif lang == <int32_t>LANGUAGE_JAVA:
arg_list = num_args * ["<java-argument>"]
+2
View File
@@ -150,6 +150,8 @@ cdef extern from "ray/common/id.h" namespace "ray" nogil:
c_bool IsDirectCallType()
CObjectID WithPlasmaTransportType()
int64_t ObjectIndex() const
CTaskID TaskId() const
+3
View File
@@ -179,6 +179,9 @@ cdef class ObjectID(BaseID):
def is_direct_call_type(self):
return self.data.IsDirectCallType()
def with_plasma_transport_type(self):
return ObjectID(self.data.WithPlasmaTransportType().Binary())
def is_nil(self):
return self.data.IsNil()