xy720 commented on code in PR #47300:
URL: https://github.com/apache/doris/pull/47300#discussion_r2227609954
##########
be/src/agent/task_worker_pool.cpp:
##########
@@ -1266,6 +1268,54 @@ void download_callback(StorageEngine& engine, ExecEnv*
env, const TAgentTaskRequ
remove_task_info(req.task_type, req.signature);
}
+void download_callback(CloudStorageEngine& engine, ExecEnv* env, const
TAgentTaskRequest& req) {
+ const auto& download_request = req.download_req;
+ LOG(INFO) << "get download task. signature=" << req.signature
+ << ", job_id=" << download_request.job_id
+ << ", task detail: " <<
apache::thrift::ThriftDebugString(download_request);
+
+ std::vector<int64_t> transferred_tablet_ids;
+
+ auto status = Status::OK();
+ if (download_request.__isset.remote_tablet_snapshots) {
+ status = Status::Error<ErrorCode::NOT_IMPLEMENTED_ERROR>(
+ "remote tablet snapshot is not supported.");
+ } else {
+ std::unique_ptr<CloudSnapshotLoader> loader =
std::make_unique<CloudSnapshotLoader>(
+ engine, env, download_request.job_id, req.signature,
download_request.broker_addr,
+ download_request.broker_prop);
+ status = loader->init(download_request.__isset.storage_backend
+ ? download_request.storage_backend
+ : TStorageBackendType::type::BROKER,
+ download_request.__isset.location ?
download_request.location : "",
+ download_request.vault_id);
+ if (status.ok()) {
+ status = loader->download(download_request.src_dest_map,
&transferred_tablet_ids);
Review Comment:
https://github.com/apache/doris/pull/50740
##########
be/src/agent/task_worker_pool.cpp:
##########
@@ -1266,6 +1268,54 @@ void download_callback(StorageEngine& engine, ExecEnv*
env, const TAgentTaskRequ
remove_task_info(req.task_type, req.signature);
}
+void download_callback(CloudStorageEngine& engine, ExecEnv* env, const
TAgentTaskRequest& req) {
+ const auto& download_request = req.download_req;
+ LOG(INFO) << "get download task. signature=" << req.signature
+ << ", job_id=" << download_request.job_id
+ << ", task detail: " <<
apache::thrift::ThriftDebugString(download_request);
+
+ std::vector<int64_t> transferred_tablet_ids;
+
+ auto status = Status::OK();
+ if (download_request.__isset.remote_tablet_snapshots) {
+ status = Status::Error<ErrorCode::NOT_IMPLEMENTED_ERROR>(
+ "remote tablet snapshot is not supported.");
+ } else {
+ std::unique_ptr<CloudSnapshotLoader> loader =
std::make_unique<CloudSnapshotLoader>(
+ engine, env, download_request.job_id, req.signature,
download_request.broker_addr,
+ download_request.broker_prop);
+ status = loader->init(download_request.__isset.storage_backend
+ ? download_request.storage_backend
+ : TStorageBackendType::type::BROKER,
+ download_request.__isset.location ?
download_request.location : "",
+ download_request.vault_id);
+ if (status.ok()) {
+ status = loader->download(download_request.src_dest_map,
&transferred_tablet_ids);
Review Comment:
https://github.com/apache/doris/pull/50740
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]