diff options
author | omgronny <omgronny@yandex-team.com> | 2024-07-09 14:07:30 +0300 |
---|---|---|
committer | omgronny <omgronny@yandex-team.com> | 2024-07-09 14:40:17 +0300 |
commit | 2c5bdb9f4c018e240baadee29088c12f9c8954fb (patch) | |
tree | 19905f7b90ba1230fecbf17ff10048681ac23642 /yt | |
parent | 4ba52e9b2c9fe8455b38c2bae92f0c75025d9469 (diff) | |
download | ydb-2c5bdb9f4c018e240baadee29088c12f9c8954fb.tar.gz |
YT-21376: Introduce scheduling_attributes_per_pool_tree with slot indices
437a65b580ff23d134c7a12af66470c607b46653
Diffstat (limited to 'yt')
-rw-r--r-- | yt/yt/client/api/operation_client.cpp | 3 | ||||
-rw-r--r-- | yt/yt/client/api/operation_client.h | 1 | ||||
-rw-r--r-- | yt/yt/client/api/operations_archive_schema.cpp | 1 | ||||
-rw-r--r-- | yt/yt/client/api/operations_archive_schema.h | 2 | ||||
-rw-r--r-- | yt/yt/client/api/rpc_proxy/helpers.cpp | 10 | ||||
-rw-r--r-- | yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto | 1 |
6 files changed, 18 insertions, 0 deletions
diff --git a/yt/yt/client/api/operation_client.cpp b/yt/yt/client/api/operation_client.cpp index db2ccf3111..acc0dfe7bb 100644 --- a/yt/yt/client/api/operation_client.cpp +++ b/yt/yt/client/api/operation_client.cpp @@ -46,6 +46,8 @@ void Serialize( .OptionalItem("suspended", operation.Suspended) .OptionalItem("result", operation.Result) .OptionalItem("events", operation.Events) + .OptionalItem("scheduling_attributes_per_pool_tree", operation.SchedulingAttributesPerPoolTree) + // COMPAT(omgronny) .OptionalItem("slot_index_per_pool_tree", operation.SlotIndexPerPoolTree) .OptionalItem("alerts", operation.Alerts) .OptionalItem("alert_events", operation.AlertEvents) @@ -121,6 +123,7 @@ void Deserialize(TOperation& operation, NYTree::IAttributeDictionaryPtr attribut setField(operation.Suspended, "suspended"); setField(operation.Events, "events"); setField(operation.Result, "result"); + setField(operation.SchedulingAttributesPerPoolTree, "scheduling_attributes_per_pool_tree"); setField(operation.SlotIndexPerPoolTree, "slot_index_per_pool_tree"); setField(operation.Alerts, "alerts"); setField(operation.AlertEvents, "alert_events"); diff --git a/yt/yt/client/api/operation_client.h b/yt/yt/client/api/operation_client.h index f11a8e63e1..08fed371f1 100644 --- a/yt/yt/client/api/operation_client.h +++ b/yt/yt/client/api/operation_client.h @@ -271,6 +271,7 @@ struct TOperation NYson::TYsonString Result; NYson::TYsonString SlotIndexPerPoolTree; + NYson::TYsonString SchedulingAttributesPerPoolTree; NYson::TYsonString Alerts; NYson::TYsonString AlertEvents; diff --git a/yt/yt/client/api/operations_archive_schema.cpp b/yt/yt/client/api/operations_archive_schema.cpp index 82a69e46ed..f1c35ee2fb 100644 --- a/yt/yt/client/api/operations_archive_schema.cpp +++ b/yt/yt/client/api/operations_archive_schema.cpp @@ -38,6 +38,7 @@ TOrderedByIdTableDescriptor::TIndex::TIndex(const TNameTablePtr& nameTable) , UnrecognizedSpec(nameTable->RegisterName("unrecognized_spec")) , FullSpec(nameTable->RegisterName("full_spec")) , RuntimeParameters(nameTable->RegisterName("runtime_parameters")) + , SchedulingAttributesPerPoolTree(nameTable->RegisterName("scheduling_attributes_per_pool_tree")) , SlotIndexPerPoolTree(nameTable->RegisterName("slot_index_per_pool_tree")) , TaskNames(nameTable->RegisterName("task_names")) , ExperimentAssignments(nameTable->RegisterName("experiment_assignments")) diff --git a/yt/yt/client/api/operations_archive_schema.h b/yt/yt/client/api/operations_archive_schema.h index 93ec01aa75..39828b2946 100644 --- a/yt/yt/client/api/operations_archive_schema.h +++ b/yt/yt/client/api/operations_archive_schema.h @@ -36,6 +36,8 @@ struct TOrderedByIdTableDescriptor const int UnrecognizedSpec; const int FullSpec; const int RuntimeParameters; + const int SchedulingAttributesPerPoolTree; + // COMPAT(omgronny) const int SlotIndexPerPoolTree; const int TaskNames; const int ExperimentAssignments; diff --git a/yt/yt/client/api/rpc_proxy/helpers.cpp b/yt/yt/client/api/rpc_proxy/helpers.cpp index b0d079153c..418820bdce 100644 --- a/yt/yt/client/api/rpc_proxy/helpers.cpp +++ b/yt/yt/client/api/rpc_proxy/helpers.cpp @@ -708,6 +708,10 @@ void ToProto(NProto::TOperation* protoOperation, const NApi::TOperation& operati protoOperation->set_slot_index_per_pool_tree(operation.SlotIndexPerPoolTree.ToString()); } + if (operation.SchedulingAttributesPerPoolTree) { + protoOperation->set_scheduling_attributes_per_pool_tree(operation.SchedulingAttributesPerPoolTree.ToString()); + } + if (operation.TaskNames) { protoOperation->set_task_names(operation.TaskNames.ToString()); } @@ -840,6 +844,12 @@ void FromProto(NApi::TOperation* operation, const NProto::TOperation& protoOpera operation->SlotIndexPerPoolTree = TYsonString(); } + if (protoOperation.has_scheduling_attributes_per_pool_tree()) { + operation->SchedulingAttributesPerPoolTree = TYsonString(protoOperation.scheduling_attributes_per_pool_tree()); + } else { + operation->SchedulingAttributesPerPoolTree = TYsonString(); + } + if (protoOperation.has_task_names()) { operation->TaskNames = TYsonString(protoOperation.task_names()); } else { diff --git a/yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto b/yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto index e0a2061690..ce46eba231 100644 --- a/yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto +++ b/yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto @@ -2992,6 +2992,7 @@ message TOperation optional bytes events = 18; // YSON optional bytes result = 19; // YSON + optional bytes scheduling_attributes_per_pool_tree = 28; // YSON optional bytes slot_index_per_pool_tree = 20; // YSON optional bytes task_names = 21; // YSON |