mirror of
https://github.com/wassname/ray.git
synced 2026-08-07 11:27:43 +08:00
[multi-language part 1] add a 'language' field to task specification (#2639)
This commit is contained in:
committed by
Robert Nishihara
parent
6670880f03
commit
a719e089b0
@@ -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.
|
||||
|
||||
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user