Skip to content

Commit 1f052bf

Browse files
Add explicitly using bucket prefix
This is to more easily demonstrate support for using with a bucket other than one that starts with "rockset.".
1 parent 7aa80d0 commit 1f052bf

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

cloud/examples/clone_example.cc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ Status CloneDB(const std::string& clone_name, const std::string& src_bucket,
6464
// No persistent cache
6565
std::string persistent_cache = "";
6666

67+
const std::string bucketPrefix = "rockset.";
6768
// create a bucket name for debugging purposes
68-
const std::string bucketName = "rockset." + kBucketSuffix;
69+
const std::string bucketName = bucketPrefix + kBucketSuffix;
6970

7071
// open clone
7172
DBCloud* db;
@@ -102,9 +103,14 @@ int main() {
102103
char* user = getenv("USER");
103104
kBucketSuffix.append(user);
104105

106+
const std::string bucketPrefix = "rockset.";
105107
// create a bucket name for debugging purposes
106-
const std::string bucketName = "rockset." + kBucketSuffix;
108+
const std::string bucketName = bucketPrefix + kBucketSuffix;
107109

110+
// Needed if using bucket prefix other than the default "rockset."
111+
cloud_env_options.src_bucket.SetBucketName(kBucketSuffix,bucketPrefix);
112+
cloud_env_options.dest_bucket.SetBucketName(kBucketSuffix,bucketPrefix);
113+
108114
// Create a new AWS cloud env Status
109115
CloudEnv* cenv;
110116
Status s =

0 commit comments

Comments
 (0)