Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
feat(bulk-load): support user-define remote storage root path (#686)
Browse files Browse the repository at this point in the history
  • Loading branch information
hycdong committed Dec 28, 2020
1 parent 2191e17 commit a583cf2
Show file tree
Hide file tree
Showing 13 changed files with 176 additions and 59 deletions.
3 changes: 2 additions & 1 deletion include/dsn/dist/replication/replication_ddl_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ class replication_ddl_client

error_with<start_bulk_load_response> start_bulk_load(const std::string &app_name,
const std::string &cluster_name,
const std::string &file_provider_type);
const std::string &file_provider_type,
const std::string &remote_root_path);

error_with<control_bulk_load_response>
control_bulk_load(const std::string &app_name, const bulk_load_control_type::type control_type);
Expand Down
36 changes: 30 additions & 6 deletions include/dsn/dist/replication/replication_types.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/client/replication_ddl_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1552,12 +1552,14 @@ void replication_ddl_client::query_disk_info(
error_with<start_bulk_load_response>
replication_ddl_client::start_bulk_load(const std::string &app_name,
const std::string &cluster_name,
const std::string &file_provider_type)
const std::string &file_provider_type,
const std::string &remote_root_path)
{
auto req = make_unique<start_bulk_load_request>();
req->app_name = app_name;
req->cluster_name = cluster_name;
req->file_provider_type = file_provider_type;
req->remote_root_path = remote_root_path;
return call_rpc_sync(start_bulk_load_rpc(std::move(req), RPC_CM_START_BULK_LOAD));
}

Expand Down
5 changes: 0 additions & 5 deletions src/common/replication_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,11 +514,6 @@ void replication_options::initialize()
cold_backup_checkpoint_reserve_minutes,
"reserve minutes of cold backup checkpoint");

bulk_load_provider_root = dsn_config_get_value_string("replication",
"bulk_load_provider_root",
"bulk_load_provider_root",
"bulk load root on remote file provider");

max_concurrent_bulk_load_downloading_count = FLAGS_max_concurrent_bulk_load_downloading_count;

replica_helper::load_meta_servers(meta_servers);
Expand Down
1 change: 0 additions & 1 deletion src/common/replication_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ class replication_options
std::string cold_backup_root;
int32_t cold_backup_checkpoint_reserve_minutes;

std::string bulk_load_provider_root;
int32_t max_concurrent_bulk_load_downloading_count;

public:
Expand Down
Loading

0 comments on commit a583cf2

Please sign in to comment.