diff options
author | dddlatyshev <dddlatyshev@yandex-team.com> | 2024-06-11 00:52:15 +0300 |
---|---|---|
committer | dddlatyshev <dddlatyshev@yandex-team.com> | 2024-06-11 01:04:06 +0300 |
commit | b7c3a9599b8242d20ee8249d6c394a5ace6866d0 (patch) | |
tree | 1acceadbca2e74751e7074ac5d28577d0c43f3b4 /yt | |
parent | d9ca3d91a6a120bab62af1f5abe12097ed705c59 (diff) | |
download | ydb-b7c3a9599b8242d20ee8249d6c394a5ace6866d0.tar.gz |
Rename pipeline status to pipeline state
66998ad6956df769779ef2612808722a32eb937c
Diffstat (limited to 'yt')
-rw-r--r-- | yt/yt/client/api/delegating_client.h | 4 | ||||
-rw-r--r-- | yt/yt/client/api/flow_client.h | 8 | ||||
-rw-r--r-- | yt/yt/client/api/rpc_proxy/api_service_proxy.h | 2 | ||||
-rw-r--r-- | yt/yt/client/api/rpc_proxy/client_impl.cpp | 10 | ||||
-rw-r--r-- | yt/yt/client/api/rpc_proxy/client_impl.h | 4 | ||||
-rw-r--r-- | yt/yt/client/driver/driver.cpp | 2 | ||||
-rw-r--r-- | yt/yt/client/driver/flow_commands.cpp | 6 | ||||
-rw-r--r-- | yt/yt/client/driver/flow_commands.h | 6 | ||||
-rw-r--r-- | yt/yt/client/federated/client.cpp | 2 | ||||
-rw-r--r-- | yt/yt/client/hedging/hedging.cpp | 2 | ||||
-rw-r--r-- | yt/yt/client/unittests/mock/client.h | 4 | ||||
-rw-r--r-- | yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto | 4 |
12 files changed, 27 insertions, 27 deletions
diff --git a/yt/yt/client/api/delegating_client.h b/yt/yt/client/api/delegating_client.h index 6e3017358c..2889cb27af 100644 --- a/yt/yt/client/api/delegating_client.h +++ b/yt/yt/client/api/delegating_client.h @@ -823,9 +823,9 @@ public: const TPausePipelineOptions& options), (pipelinePath, options)) - DELEGATE_METHOD(TFuture<TPipelineStatus>, GetPipelineStatus, ( + DELEGATE_METHOD(TFuture<TPipelineState>, GetPipelineState, ( const NYPath::TYPath& pipelinePath, - const TGetPipelineStatusOptions& options), + const TGetPipelineStateOptions& options), (pipelinePath, options)) DELEGATE_METHOD(TFuture<TGetFlowViewResult>, GetFlowView, ( diff --git a/yt/yt/client/api/flow_client.h b/yt/yt/client/api/flow_client.h index 69f4d01bc4..4e6f63a26e 100644 --- a/yt/yt/client/api/flow_client.h +++ b/yt/yt/client/api/flow_client.h @@ -20,11 +20,11 @@ struct TPausePipelineOptions : public TTimeoutOptions { }; -struct TGetPipelineStatusOptions +struct TGetPipelineStateOptions : public TTimeoutOptions { }; -struct TPipelineStatus +struct TPipelineState { NFlow::EPipelineState State; }; @@ -116,9 +116,9 @@ struct IFlowClient const NYPath::TYPath& pipelinePath, const TPausePipelineOptions& options = {}) = 0; - virtual TFuture<TPipelineStatus> GetPipelineStatus( + virtual TFuture<TPipelineState> GetPipelineState( const NYPath::TYPath& pipelinePath, - const TGetPipelineStatusOptions& options = {}) = 0; + const TGetPipelineStateOptions& options = {}) = 0; virtual TFuture<TGetFlowViewResult> GetFlowView( const NYPath::TYPath& pipelinePath, diff --git a/yt/yt/client/api/rpc_proxy/api_service_proxy.h b/yt/yt/client/api/rpc_proxy/api_service_proxy.h index dfe5550379..6270a25e6b 100644 --- a/yt/yt/client/api/rpc_proxy/api_service_proxy.h +++ b/yt/yt/client/api/rpc_proxy/api_service_proxy.h @@ -187,7 +187,7 @@ public: DEFINE_RPC_PROXY_METHOD(NRpcProxy::NProto, StartPipeline); DEFINE_RPC_PROXY_METHOD(NRpcProxy::NProto, StopPipeline); DEFINE_RPC_PROXY_METHOD(NRpcProxy::NProto, PausePipeline); - DEFINE_RPC_PROXY_METHOD(NRpcProxy::NProto, GetPipelineStatus); + DEFINE_RPC_PROXY_METHOD(NRpcProxy::NProto, GetPipelineState); DEFINE_RPC_PROXY_METHOD(NRpcProxy::NProto, GetFlowView); // Query tracker diff --git a/yt/yt/client/api/rpc_proxy/client_impl.cpp b/yt/yt/client/api/rpc_proxy/client_impl.cpp index 16725b33b0..01713fc678 100644 --- a/yt/yt/client/api/rpc_proxy/client_impl.cpp +++ b/yt/yt/client/api/rpc_proxy/client_impl.cpp @@ -2522,19 +2522,19 @@ TFuture<void> TClient::PausePipeline( return req->Invoke().AsVoid(); } -TFuture<TPipelineStatus> TClient::GetPipelineStatus( +TFuture<TPipelineState> TClient::GetPipelineState( const NYPath::TYPath& pipelinePath, - const TGetPipelineStatusOptions& options) + const TGetPipelineStateOptions& options) { auto proxy = CreateApiServiceProxy(); - auto req = proxy.GetPipelineStatus(); + auto req = proxy.GetPipelineState(); SetTimeoutOptions(*req, options); req->set_pipeline_path(pipelinePath); - return req->Invoke().Apply(BIND([] (const TApiServiceProxy::TRspGetPipelineStatusPtr& rsp) { - return TPipelineStatus{ + return req->Invoke().Apply(BIND([] (const TApiServiceProxy::TRspGetPipelineStatePtr& rsp) { + return TPipelineState{ .State = FromProto<NFlow::EPipelineState>(rsp->state()), }; })); diff --git a/yt/yt/client/api/rpc_proxy/client_impl.h b/yt/yt/client/api/rpc_proxy/client_impl.h index 86a1f54856..db4ff7d8a9 100644 --- a/yt/yt/client/api/rpc_proxy/client_impl.h +++ b/yt/yt/client/api/rpc_proxy/client_impl.h @@ -545,9 +545,9 @@ public: const NYPath::TYPath& pipelinePath, const TPausePipelineOptions& options = {}) override; - TFuture<TPipelineStatus> GetPipelineStatus( + TFuture<TPipelineState> GetPipelineState( const NYPath::TYPath& pipelinePath, - const TGetPipelineStatusOptions& options) override; + const TGetPipelineStateOptions& options) override; TFuture<TGetFlowViewResult> GetFlowView( const NYPath::TYPath& pipelinePath, diff --git a/yt/yt/client/driver/driver.cpp b/yt/yt/client/driver/driver.cpp index 9dc3c56237..6ab6f64d4a 100644 --- a/yt/yt/client/driver/driver.cpp +++ b/yt/yt/client/driver/driver.cpp @@ -377,7 +377,7 @@ public: REGISTER (TStartPipelineCommand, "start_pipeline", Null, Structured, true, false, ApiVersion4); REGISTER (TStopPipelineCommand, "stop_pipeline", Null, Structured, true, false, ApiVersion4); REGISTER (TPausePipelineCommand, "pause_pipeline", Null, Structured, true, false, ApiVersion4); - REGISTER (TGetPipelineStatusCommand, "get_pipeline_status", Null, Structured, false, false, ApiVersion4); + REGISTER (TGetPipelineStateCommand, "get_pipeline_state", Null, Structured, false, false, ApiVersion4); REGISTER (TGetFlowViewCommand, "get_flow_view", Null, Structured, false, false, ApiVersion4); if (Config_->EnableInternalCommands) { diff --git a/yt/yt/client/driver/flow_commands.cpp b/yt/yt/client/driver/flow_commands.cpp index d9224480e6..9bf8c8c783 100644 --- a/yt/yt/client/driver/flow_commands.cpp +++ b/yt/yt/client/driver/flow_commands.cpp @@ -314,13 +314,13 @@ void TPausePipelineCommand::DoExecute(ICommandContextPtr context) //////////////////////////////////////////////////////////////////////////////// -void TGetPipelineStatusCommand::Register(TRegistrar /*registrar*/) +void TGetPipelineStateCommand::Register(TRegistrar /*registrar*/) { } -void TGetPipelineStatusCommand::DoExecute(ICommandContextPtr context) +void TGetPipelineStateCommand::DoExecute(ICommandContextPtr context) { auto client = context->GetClient(); - auto result = WaitFor(client->GetPipelineStatus(PipelinePath, Options)) + auto result = WaitFor(client->GetPipelineState(PipelinePath, Options)) .ValueOrThrow(); context->ProduceOutputValue(TYsonString(ToString(result.State))); diff --git a/yt/yt/client/driver/flow_commands.h b/yt/yt/client/driver/flow_commands.h index 74f8068a7c..db3bfee623 100644 --- a/yt/yt/client/driver/flow_commands.h +++ b/yt/yt/client/driver/flow_commands.h @@ -169,12 +169,12 @@ private: //////////////////////////////////////////////////////////////////////////////// -class TGetPipelineStatusCommand - : public TTypedCommand<NApi::TGetPipelineStatusOptions> +class TGetPipelineStateCommand + : public TTypedCommand<NApi::TGetPipelineStateOptions> , public TPipelineCommandBase { public: - REGISTER_YSON_STRUCT_LITE(TGetPipelineStatusCommand); + REGISTER_YSON_STRUCT_LITE(TGetPipelineStateCommand); static void Register(TRegistrar registrar); diff --git a/yt/yt/client/federated/client.cpp b/yt/yt/client/federated/client.cpp index c4c71e882e..5e6447f3c3 100644 --- a/yt/yt/client/federated/client.cpp +++ b/yt/yt/client/federated/client.cpp @@ -450,7 +450,7 @@ public: UNIMPLEMENTED_METHOD(TFuture<void>, StartPipeline, (const NYPath::TYPath&, const TStartPipelineOptions&)); UNIMPLEMENTED_METHOD(TFuture<void>, StopPipeline, (const NYPath::TYPath&, const TStopPipelineOptions&)); UNIMPLEMENTED_METHOD(TFuture<void>, PausePipeline, (const NYPath::TYPath&, const TPausePipelineOptions&)); - UNIMPLEMENTED_METHOD(TFuture<TPipelineStatus>, GetPipelineStatus, (const NYPath::TYPath&, const TGetPipelineStatusOptions&)); + UNIMPLEMENTED_METHOD(TFuture<TPipelineState>, GetPipelineState, (const NYPath::TYPath&, const TGetPipelineStateOptions&)); UNIMPLEMENTED_METHOD(TFuture<TGetFlowViewResult>, GetFlowView, (const NYPath::TYPath&, const NYPath::TYPath&, const TGetFlowViewOptions&)); private: diff --git a/yt/yt/client/hedging/hedging.cpp b/yt/yt/client/hedging/hedging.cpp index cf06d4e150..10833b8f92 100644 --- a/yt/yt/client/hedging/hedging.cpp +++ b/yt/yt/client/hedging/hedging.cpp @@ -225,7 +225,7 @@ public: UNSUPPORTED_METHOD(TFuture<void>, StartPipeline, (const TYPath&, const TStartPipelineOptions&)); UNSUPPORTED_METHOD(TFuture<void>, StopPipeline, (const TYPath&, const TStopPipelineOptions&)); UNSUPPORTED_METHOD(TFuture<void>, PausePipeline, (const TYPath&, const TPausePipelineOptions&)); - UNSUPPORTED_METHOD(TFuture<TPipelineStatus>, GetPipelineStatus, (const TYPath&, const TGetPipelineStatusOptions&)); + UNSUPPORTED_METHOD(TFuture<TPipelineState>, GetPipelineState, (const TYPath&, const TGetPipelineStateOptions&)); UNSUPPORTED_METHOD(TFuture<TGetFlowViewResult>, GetFlowView, (const NYPath::TYPath&, const NYPath::TYPath&, const TGetFlowViewOptions&)); private: diff --git a/yt/yt/client/unittests/mock/client.h b/yt/yt/client/unittests/mock/client.h index b285b51fff..25e46ade40 100644 --- a/yt/yt/client/unittests/mock/client.h +++ b/yt/yt/client/unittests/mock/client.h @@ -808,9 +808,9 @@ public: const TPausePipelineOptions& options), (override)); - MOCK_METHOD(TFuture<TPipelineStatus>, GetPipelineStatus, ( + MOCK_METHOD(TFuture<TPipelineState>, GetPipelineState, ( const NYPath::TYPath& pipelinePath, - const TGetPipelineStatusOptions& options), + const TGetPipelineStateOptions& options), (override)); MOCK_METHOD(TFuture<TGetFlowViewResult>, GetFlowView, ( 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 5447738bb2..2ca9463db2 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 @@ -2909,12 +2909,12 @@ message TRspStopPipeline //////////////////////////////////////////////////////////////////////////////// -message TReqGetPipelineStatus +message TReqGetPipelineState { required string pipeline_path = 1; } -message TRspGetPipelineStatus +message TRspGetPipelineState { // TODO(babenko): provide native proto enum required int32 state = 1; // EPipelineState |