[multi-language part 1] add a 'language' field to task specification (#2639)

This commit is contained in:
Hao Chen
2018-08-16 21:26:42 -07:00
committed by Robert Nishihara
parent 6670880f03
commit a719e089b0
13 changed files with 200 additions and 402 deletions
+10
View File
@@ -20,6 +20,14 @@ table ResourcePair {
value: double;
}
// NOTE: This enum is duplicate with the `Language` enum in `gcs.fbs`,
// because we cannot include this file in `gcs.fbs` due to cyclic dependency.
// TODO(raulchen): remove it once we get rid of legacy ray.
enum TaskLanguage:int {
PYTHON = 0,
JAVA = 1
}
table TaskInfo {
// ID of the driver that created this task.
driver_id: string;
@@ -52,6 +60,8 @@ table TaskInfo {
// The required_resources vector indicates the quantities of the different
// resources required by this task.
required_resources: [ResourcePair];
// The language that this task belongs to
language: TaskLanguage;
}
// Object information data structure.
+2 -1
View File
@@ -462,7 +462,8 @@ static int PyTask_init(PyTask *self, PyObject *args, PyObject *kwds) {
self->task_spec = new ray::raylet::TaskSpecification(
driver_id, parent_task_id, parent_counter, actor_creation_id,
actor_creation_dummy_object_id, actor_id, actor_handle_id,
actor_counter, function_id, args, num_returns, required_resources);
actor_counter, function_id, args, num_returns, required_resources,
Language::PYTHON);
}
/* Set the task's execution dependencies. */