This is an automated email from the ASF dual-hosted git repository. plat1ko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 4b58fc95097 [enhance](Cloud) Unify add storage vault http action (#34119) 4b58fc95097 is described below commit 4b58fc95097f853e66c919065f63d14756549899 Author: AlexYue <yj976240...@gmail.com> AuthorDate: Fri Apr 26 20:32:42 2024 +0800 [enhance](Cloud) Unify add storage vault http action (#34119) --- cloud/src/meta-service/meta_service_http.cpp | 8 +++++++- cloud/src/meta-service/meta_service_resource.cpp | 3 +++ gensrc/proto/cloud.proto | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/cloud/src/meta-service/meta_service_http.cpp b/cloud/src/meta-service/meta_service_http.cpp index 80ae08ef251..4542e05e486 100644 --- a/cloud/src/meta-service/meta_service_http.cpp +++ b/cloud/src/meta-service/meta_service_http.cpp @@ -209,7 +209,10 @@ static HttpResponse process_alter_obj_store_info(MetaServiceImpl* service, brpc: static std::unordered_map<std::string_view, AlterObjStoreInfoRequest::Operation> operations { {"add_obj_info", AlterObjStoreInfoRequest::ADD_OBJ_INFO}, {"legacy_update_ak_sk", AlterObjStoreInfoRequest::LEGACY_UPDATE_AK_SK}, - {"drop_hdfs_vault", AlterObjStoreInfoRequest::DROP_HDFS_INFO}}; + {"drop_s3_vault", AlterObjStoreInfoRequest::DROP_S3_VAULT}, + {"add_s3_vault", AlterObjStoreInfoRequest::ADD_S3_VAULT}, + {"drop_hdfs_vault", AlterObjStoreInfoRequest::DROP_HDFS_INFO}, + {"add_hdfs_vault", AlterObjStoreInfoRequest::ADD_HDFS_INFO}}; auto& path = ctrl->http_request().unresolved_path(); auto it = operations.find(remove_version_prefix(path)); @@ -444,6 +447,9 @@ void MetaServiceImpl::http(::google::protobuf::RpcController* controller, {"v1/legacy_update_ak_sk", process_alter_obj_store_info}, {"v1/update_ak_sk", process_update_ak_sk}, {"show_storage_vaults", process_get_obj_store_info}, + {"add_hdfs_vault", process_alter_obj_store_info}, + {"add_s3_vault", process_alter_obj_store_info}, + {"drop_s3_vault", process_alter_obj_store_info}, {"drop_hdfs_vault", process_alter_obj_store_info}, // for tools {"decode_key", process_decode_key}, diff --git a/cloud/src/meta-service/meta_service_resource.cpp b/cloud/src/meta-service/meta_service_resource.cpp index 0adb3f0ac7e..eefd01eb254 100644 --- a/cloud/src/meta-service/meta_service_resource.cpp +++ b/cloud/src/meta-service/meta_service_resource.cpp @@ -537,6 +537,7 @@ void MetaServiceImpl::alter_obj_store_info(google::protobuf::RpcController* cont switch (request->op()) { case AlterObjStoreInfoRequest::ADD_OBJ_INFO: case AlterObjStoreInfoRequest::ADD_S3_VAULT: + case AlterObjStoreInfoRequest::DROP_S3_VAULT: case AlterObjStoreInfoRequest::LEGACY_UPDATE_AK_SK: case AlterObjStoreInfoRequest::UPDATE_AK_SK: { if (!request->has_obj() && (!request->has_vault() || !request->vault().has_obj_info())) { @@ -824,6 +825,8 @@ void MetaServiceImpl::alter_obj_store_info(google::protobuf::RpcController* cont instance.clear_default_storage_vault_name(); break; } + case AlterObjStoreInfoRequest::DROP_S3_VAULT: + [[fallthrough]]; default: { code = MetaServiceCode::INVALID_ARGUMENT; ss << "invalid request op, op=" << request->op(); diff --git a/gensrc/proto/cloud.proto b/gensrc/proto/cloud.proto index f132e2eab4d..ba9017a5ecc 100644 --- a/gensrc/proto/cloud.proto +++ b/gensrc/proto/cloud.proto @@ -775,6 +775,7 @@ message AlterObjStoreInfoRequest { DROP_HDFS_INFO = 101; ADD_BUILT_IN_VAULT = 102; ADD_S3_VAULT = 103; + DROP_S3_VAULT = 104; SET_DEFAULT_VAULT = 200; UNSET_DEFAULT_VAULT = 201; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org