@@ -363,11 +363,11 @@ Status AwsEnv::NewSequentialFile(const std::string& logical_fname,
363363 if (cloud_env_options.keep_local_sst_files || !sstfile) {
364364 // copy the file to the local storage if keep_local_sst_files is true
365365 if (HasDestBucket ()) {
366- st = cloud_env_options.storage_provider ->GetObject (
366+ st = cloud_env_options.storage_provider ->GetCloudObject (
367367 GetDestBucketName (), destname (fname), fname);
368368 }
369369 if (!st.ok () && HasSrcBucket () && !SrcMatchesDest ()) {
370- st = cloud_env_options.storage_provider ->GetObject (
370+ st = cloud_env_options.storage_provider ->GetCloudObject (
371371 GetSrcBucketName (), srcname (fname), fname);
372372 }
373373 if (st.ok ()) {
@@ -436,11 +436,11 @@ Status AwsEnv::NewRandomAccessFile(const std::string& logical_fname,
436436 if (!st.ok ()) {
437437 // copy the file to the local storage if keep_local_sst_files is true
438438 if (HasDestBucket ()) {
439- st = cloud_env_options.storage_provider ->GetObject (
439+ st = cloud_env_options.storage_provider ->GetCloudObject (
440440 GetDestBucketName (), destname (fname), fname);
441441 }
442442 if (!st.ok () && HasSrcBucket () && !SrcMatchesDest ()) {
443- st = cloud_env_options.storage_provider ->GetObject (
443+ st = cloud_env_options.storage_provider ->GetCloudObject (
444444 GetSrcBucketName (), srcname (fname), fname);
445445 }
446446 if (st.ok ()) {
@@ -459,11 +459,11 @@ Status AwsEnv::NewRandomAccessFile(const std::string& logical_fname,
459459 }
460460 stax = Status::NotFound ();
461461 if (HasDestBucket ()) {
462- stax = cloud_env_options.storage_provider ->GetObjectSize (
462+ stax = cloud_env_options.storage_provider ->GetCloudObjectSize (
463463 GetDestBucketName (), destname (fname), &remote_size);
464464 }
465465 if (stax.IsNotFound () && HasSrcBucket ()) {
466- stax = cloud_env_options.storage_provider ->GetObjectSize (
466+ stax = cloud_env_options.storage_provider ->GetCloudObjectSize (
467467 GetSrcBucketName (), srcname (fname), &remote_size);
468468 }
469469 if (stax.IsNotFound () && !HasDestBucket ()) {
@@ -638,12 +638,12 @@ Status AwsEnv::FileExists(const std::string& logical_fname) {
638638 // We read first from local storage and then from cloud storage.
639639 st = base_env_->FileExists (fname);
640640 if (st.IsNotFound () && HasDestBucket ()) {
641- st = cloud_env_options.storage_provider ->ExistsObject ( GetDestBucketName (),
642- destname (fname));
641+ st = cloud_env_options.storage_provider ->ExistsCloudObject (
642+ GetDestBucketName (), destname (fname));
643643 }
644644 if (!st.ok () && HasSrcBucket ()) {
645- st = cloud_env_options.storage_provider ->ExistsObject ( GetSrcBucketName (),
646- srcname (fname));
645+ st = cloud_env_options.storage_provider ->ExistsCloudObject (
646+ GetSrcBucketName (), srcname (fname));
647647 }
648648 } else if (logfile && !cloud_env_options.keep_local_log_files ) {
649649 // read from Kinesis
@@ -666,7 +666,7 @@ Status AwsEnv::GetChildren(const std::string& path,
666666 // Fetch the list of children from both buckets in S3
667667 Status st;
668668 if (HasSrcBucket () && !cloud_env_options.skip_cloud_files_in_getchildren ) {
669- st = cloud_env_options.storage_provider ->ListObjects (
669+ st = cloud_env_options.storage_provider ->ListCloudObjects (
670670 GetSrcBucketName (), GetSrcObjectPath (), result);
671671 if (!st.ok ()) {
672672 Log (InfoLogLevel::ERROR_LEVEL, info_log_,
@@ -677,7 +677,7 @@ Status AwsEnv::GetChildren(const std::string& path,
677677 }
678678 if (HasDestBucket () && !SrcMatchesDest () &&
679679 !cloud_env_options.skip_cloud_files_in_getchildren ) {
680- st = cloud_env_options.storage_provider ->ListObjects (
680+ st = cloud_env_options.storage_provider ->ListCloudObjects (
681681 GetDestBucketName (), GetDestObjectPath (), result);
682682 if (!st.ok ()) {
683683 Log (InfoLogLevel::ERROR_LEVEL, info_log_,
@@ -809,7 +809,7 @@ Status AwsEnv::DeleteFile(const std::string& logical_fname) {
809809Status AwsEnv::CopyLocalFileToDest (const std::string& local_name,
810810 const std::string& dest_name) {
811811 RemoveFileFromDeletionQueue (basename (local_name));
812- return cloud_env_options.storage_provider ->PutObject (
812+ return cloud_env_options.storage_provider ->PutCloudObject (
813813 local_name, GetDestBucketName (), dest_name);
814814}
815815
@@ -829,7 +829,7 @@ Status AwsEnv::DeleteCloudFileFromDest(const std::string& fname) {
829829 }
830830 auto path = GetDestObjectPath () + " /" + base;
831831 // we are ready to delete the file!
832- auto st = cloud_env_options.storage_provider ->DeleteObject (
832+ auto st = cloud_env_options.storage_provider ->DeleteCloudObject (
833833 GetDestBucketName (), path);
834834 if (!st.ok () && !st.IsNotFound ()) {
835835 Log (InfoLogLevel::ERROR_LEVEL, info_log_,
@@ -916,11 +916,11 @@ Status AwsEnv::GetFileSize(const std::string& logical_fname, uint64_t* size) {
916916 st = Status::NotFound ();
917917 // Get file length from S3
918918 if (HasDestBucket ()) {
919- st = cloud_env_options.storage_provider ->GetObjectSize (
919+ st = cloud_env_options.storage_provider ->GetCloudObjectSize (
920920 GetDestBucketName (), destname (fname), size);
921921 }
922922 if (st.IsNotFound () && HasSrcBucket ()) {
923- st = cloud_env_options.storage_provider ->GetObjectSize (
923+ st = cloud_env_options.storage_provider ->GetCloudObjectSize (
924924 GetSrcBucketName (), srcname (fname), size);
925925 }
926926 }
@@ -952,11 +952,11 @@ Status AwsEnv::GetFileModificationTime(const std::string& logical_fname,
952952 } else {
953953 st = Status::NotFound ();
954954 if (HasDestBucket ()) {
955- st = cloud_env_options.storage_provider ->GetObjectModificationTime (
955+ st = cloud_env_options.storage_provider ->GetCloudObjectModificationTime (
956956 GetDestBucketName (), destname (fname), time);
957957 }
958958 if (st.IsNotFound () && HasSrcBucket ()) {
959- st = cloud_env_options.storage_provider ->GetObjectModificationTime (
959+ st = cloud_env_options.storage_provider ->GetCloudObjectModificationTime (
960960 GetSrcBucketName (), srcname (fname), time);
961961 }
962962 }
@@ -1054,7 +1054,7 @@ Status AwsEnv::SaveIdentitytoS3(const std::string& localfile,
10541054
10551055 // Upload ID file to S3
10561056 if (st.ok ()) {
1057- st = cloud_env_options.storage_provider ->PutObject (
1057+ st = cloud_env_options.storage_provider ->PutCloudObject (
10581058 localfile, GetDestBucketName (), idfile);
10591059 }
10601060
@@ -1079,7 +1079,7 @@ Status AwsEnv::SaveDbid(const std::string& bucket_name, const std::string& dbid,
10791079 std::unordered_map<std::string, std::string> metadata;
10801080 metadata[" dirname" ] = dirname;
10811081
1082- Status st = cloud_env_options.storage_provider ->PutObjectMetadata (
1082+ Status st = cloud_env_options.storage_provider ->PutCloudObjectMetadata (
10831083 bucket_name, dbidkey, metadata);
10841084
10851085 if (!st.ok ()) {
@@ -1107,7 +1107,7 @@ Status AwsEnv::GetPathForDbid(const std::string& bucket,
11071107 dbid.c_str ());
11081108
11091109 std::unordered_map<std::string, std::string> metadata;
1110- Status st = cloud_env_options.storage_provider ->GetObjectMetadata (
1110+ Status st = cloud_env_options.storage_provider ->GetCloudObjectMetadata (
11111111 bucket, dbidkey, &metadata);
11121112 if (!st.ok ()) {
11131113 if (st.IsNotFound ()) {
@@ -1142,7 +1142,7 @@ Status AwsEnv::GetDbidList(const std::string& bucket, DbidList* dblist) {
11421142
11431143 // fetch the list all all dbids
11441144 std::vector<std::string> dbid_list;
1145- Status st = cloud_env_options.storage_provider ->ListObjects (
1145+ Status st = cloud_env_options.storage_provider ->ListCloudObjects (
11461146 bucket, dbid_registry_, &dbid_list);
11471147 if (!st.ok ()) {
11481148 Log (InfoLogLevel::ERROR_LEVEL, info_log_,
@@ -1174,7 +1174,8 @@ Status AwsEnv::DeleteDbid(const std::string& bucket,
11741174
11751175 // fetch the list all all dbids
11761176 std::string dbidkey = dbid_registry_ + dbid;
1177- Status st = cloud_env_options.storage_provider ->DeleteObject (bucket, dbidkey);
1177+ Status st =
1178+ cloud_env_options.storage_provider ->DeleteCloudObject (bucket, dbidkey);
11781179 Log (InfoLogLevel::DEBUG_LEVEL, info_log_,
11791180 " [aws] %s DeleteDbid DeleteDbid(%s) %s" , bucket.c_str (), dbid.c_str (),
11801181 st.ToString ().c_str ());
0 commit comments