[HOTFIX] Fix master build with missing placement group argument (#9868)

* fix common task submit default placement group

* fix java_function
This commit is contained in:
chaokunyang
2020-08-04 11:19:15 -07:00
committed by GitHub
parent c16e1b9524
commit 3323ad9d59
2 changed files with 9 additions and 4 deletions
+4 -1
View File
@@ -68,7 +68,10 @@ def java_function(class_name, function_name):
None, # resources,
None, # num_return_vals,
None, # max_calls,
None) # max_retries)
None, # max_retries
placement_group_id=None,
# TODO(ekl) set default to -1 once we support -1 as "any index"
placement_group_bundle_index=0)
def java_actor_class(class_name):
@@ -197,9 +197,11 @@ JNIEXPORT jobject JNICALL Java_io_ray_runtime_task_NativeTaskSubmitter_nativeSub
std::vector<ObjectID> return_ids;
// TODO (kfstorm): Allow setting `max_retries` via `CallOptions`.
ray::CoreWorkerProcess::GetCoreWorker().SubmitTask(ray_function, task_args,
task_options, &return_ids,
/*max_retries=*/0);
ray::CoreWorkerProcess::GetCoreWorker().SubmitTask(
ray_function, task_args, task_options, &return_ids,
/*max_retries=*/0,
/*placement_options=*/
std::pair<ray::PlacementGroupID, int64_t>(ray::PlacementGroupID::Nil(), 0));
// This is to avoid creating an empty java list and boost performance.
if (return_ids.empty()) {