[JavaWorker] Changes to the directory under src for support java worker (#2093)

* Changes to the directory under src for support java worker
--------------------------
This commit includes changes to the directory under src, which is part of the java worker support of Ray.
It consists of the following changes:
 src/common/task.cc - just fix null point problem
 org_ray_spi_impl_DefaultLocalSchedulerClient.* - JNI support for local scheduler client, and the org_ray_spi_impl_DefaultLocalSchedulerClient.cc file is not autogenerated
This commit is contained in:
Yujie Liu
2018-05-25 00:59:05 -07:00
committed by Robert Nishihara
parent fa97acbc89
commit 5c2b2c7b49
3 changed files with 351 additions and 1 deletions
+5 -1
View File
@@ -324,7 +324,11 @@ int TaskSpec_arg_id_count(TaskSpec *spec, int64_t arg_index) {
RAY_CHECK(spec);
auto message = flatbuffers::GetRoot<TaskInfo>(spec);
auto ids = message->args()->Get(arg_index)->object_ids();
return ids->size();
if (ids == nullptr) {
return 0;
} else {
return ids->size();
}
}
ObjectID TaskSpec_arg_id(TaskSpec *spec, int64_t arg_index, int64_t id_index) {