This is an automated email from the ASF dual-hosted git repository.

laiyingchun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git


The following commit(s) were added to refs/heads/master by this push:
     new c5394b31b Fix compile error
c5394b31b is described below

commit c5394b31b716dcff5ab1b23d4c1c57ef9bb3c7b6
Author: xinghuayu007 <[email protected]>
AuthorDate: Mon Jul 10 15:01:10 2023 +0800

    Fix compile error
    
    Change-Id: I850ca91f4647defea58c103824b5c8b4c64cd781
    Reviewed-on: http://gerrit.cloudera.org:8080/20176
    Reviewed-by: Yingchun Lai <[email protected]>
    Tested-by: Yingchun Lai <[email protected]>
---
 src/kudu/tserver/tablet_copy_client.cc         |  8 ++++----
 src/kudu/tserver/tablet_copy_source_session.cc | 10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/kudu/tserver/tablet_copy_client.cc 
b/src/kudu/tserver/tablet_copy_client.cc
index 7c4e872e3..9ae5c841b 100644
--- a/src/kudu/tserver/tablet_copy_client.cc
+++ b/src/kudu/tserver/tablet_copy_client.cc
@@ -319,8 +319,8 @@ Status RemoteTabletCopyClient::Start(const HostPort& 
copy_source_addr,
     // Delete the temporary superblock file finally.
     auto deleter = MakeScopedCleanup([&]() {
       if (!superblock_path.empty() &&
-          dst_fs_manager_->env()->FileExists(superblock_path)) {
-        WARN_NOT_OK(dst_fs_manager_->env()->DeleteFile(superblock_path),
+          dst_fs_manager_->GetEnv()->FileExists(superblock_path)) {
+        WARN_NOT_OK(dst_fs_manager_->GetEnv()->DeleteFile(superblock_path),
                     Substitute("Could not delete temporary superblock file $0",
                                superblock_path));
       }
@@ -330,7 +330,7 @@ Status RemoteTabletCopyClient::Start(const HostPort& 
copy_source_addr,
     remote_superblock_.reset(new tablet::TabletSuperBlockPB);
     // Load superblock from a local temporary file.
     RETURN_NOT_OK_PREPEND(
-        pb_util::ReadPBContainerFromPath(dst_fs_manager_->env(), 
superblock_path,
+        pb_util::ReadPBContainerFromPath(dst_fs_manager_->GetEnv(), 
superblock_path,
                                          remote_superblock_.get(), 
pb_util::SENSITIVE),
         Substitute("Could not load superblock from $0", superblock_path));
   } else {
@@ -925,7 +925,7 @@ Status RemoteTabletCopyClient::DownloadSuperBlock(string* 
superblock_path) {
   // Create a temporary file to store the superblock.
   string tmpl = "super_block.tmp.XXXXXX";
   unique_ptr<RWFile> tmp_file;
-  RETURN_NOT_OK_PREPEND(dst_fs_manager_->env()->NewTempRWFile(
+  RETURN_NOT_OK_PREPEND(dst_fs_manager_->GetEnv()->NewTempRWFile(
       RWFileOptions(), tmpl, superblock_path, &tmp_file),
                         "could not create temporary super block data file");
 
diff --git a/src/kudu/tserver/tablet_copy_source_session.cc 
b/src/kudu/tserver/tablet_copy_source_session.cc
index 645392328..3058c56aa 100644
--- a/src/kudu/tserver/tablet_copy_source_session.cc
+++ b/src/kudu/tserver/tablet_copy_source_session.cc
@@ -321,14 +321,14 @@ Status 
TabletCopySourceSession::GetSuperBlockPiece(uint64_t offset,
                                                    TabletCopyErrorPB::Code* 
error_code) {
   if (offset == 0) {
     RETURN_NOT_OK_PREPEND(pb_util::WritePBContainerToPath(
-                          fs_manager_->env(), superblock_tmp_path_, 
tablet_superblock_,
+                          fs_manager_->GetEnv(), superblock_tmp_path_, 
tablet_superblock_,
                           pb_util::NO_OVERWRITE, pb_util::SYNC,
                           pb_util::SENSITIVE),
                           Substitute("Failed to write tablet metadata $0", 
tablet_id_));
   }
   unique_ptr<RandomAccessFile> super_block_reader;
-  RETURN_NOT_OK(fs_manager_->env()->NewRandomAccessFile(superblock_tmp_path_,
-                                                        &super_block_reader));
+  
RETURN_NOT_OK(fs_manager_->GetEnv()->NewRandomAccessFile(superblock_tmp_path_,
+                                                           
&super_block_reader));
   uint64_t file_size;
   RETURN_NOT_OK(super_block_reader->Size(&file_size));
   *superblock_file_size = file_size;
@@ -493,8 +493,8 @@ 
RemoteTabletCopySourceSession::RemoteTabletCopySourceSession(
 
 RemoteTabletCopySourceSession::~RemoteTabletCopySourceSession() {
   if (!superblock_tmp_path_.empty() &&
-      fs_manager_->env()->FileExists(superblock_tmp_path_)) {
-    CHECK_OK(fs_manager_->env()->DeleteFile(superblock_tmp_path_));
+      fs_manager_->GetEnv()->FileExists(superblock_tmp_path_)) {
+    CHECK_OK(fs_manager_->GetEnv()->DeleteFile(superblock_tmp_path_));
   }
   // No lock taken in the destructor, should only be 1 thread with access now.
   CHECK_OK(UnregisterAnchorIfNeededUnlocked());

Reply via email to