kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpe...@apache.org
Subject [2/2] kudu git commit: tablet copy: Fix tidy warnings in TabletCopySourceSession{Test}
Date Tue, 29 Nov 2016 20:04:27 GMT
tablet copy: Fix tidy warnings in TabletCopySourceSession{Test}

Done as a follow-up commit to allow for a clean rename in the previous
commit.

Change-Id: I5b9dd173a8c0a7118225a5b4f24ae905c98e3c27
Reviewed-on: http://gerrit.cloudera.org:8080/5257
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <todd@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/a0f425f7
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/a0f425f7
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/a0f425f7

Branch: refs/heads/master
Commit: a0f425f7636541422e97b39b89f9fe39e9dbd4f6
Parents: f2dac5d
Author: Mike Percy <mpercy@apache.org>
Authored: Fri Nov 25 14:57:53 2016 +0000
Committer: Mike Percy <mpercy@apache.org>
Committed: Tue Nov 29 20:04:03 2016 +0000

----------------------------------------------------------------------
 src/kudu/tserver/tablet_copy_source_session-test.cc |  3 +--
 src/kudu/tserver/tablet_copy_source_session.cc      | 14 ++++----------
 2 files changed, 5 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/a0f425f7/src/kudu/tserver/tablet_copy_source_session-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tserver/tablet_copy_source_session-test.cc b/src/kudu/tserver/tablet_copy_source_session-test.cc
index ec5194c..9be1c81 100644
--- a/src/kudu/tserver/tablet_copy_source_session-test.cc
+++ b/src/kudu/tserver/tablet_copy_source_session-test.cc
@@ -50,7 +50,6 @@ namespace kudu {
 namespace tserver {
 
 using consensus::ConsensusMetadata;
-using consensus::OpId;
 using consensus::RaftConfigPB;
 using consensus::RaftPeerPB;
 using fs::ReadableBlock;
@@ -114,7 +113,7 @@ class TabletCopyTest : public KuduTabletTest {
                             Unretained(this),
                             tablet()->tablet_id())));
 
-    // TODO similar to code in tablet_peer-test, consider refactor.
+    // TODO(dralves) similar to code in tablet_peer-test, consider refactor.
     RaftConfigPB config;
     config.add_peers()->CopyFrom(config_peer);
     config.set_opid_index(consensus::kInvalidOpIdIndex);

http://git-wip-us.apache.org/repos/asf/kudu/blob/a0f425f7/src/kudu/tserver/tablet_copy_source_session.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tserver/tablet_copy_source_session.cc b/src/kudu/tserver/tablet_copy_source_session.cc
index d7c5d1c..597714b 100644
--- a/src/kudu/tserver/tablet_copy_source_session.cc
+++ b/src/kudu/tserver/tablet_copy_source_session.cc
@@ -44,16 +44,11 @@ namespace tserver {
 using consensus::MinimumOpId;
 using consensus::OpId;
 using fs::ReadableBlock;
-using log::LogAnchorRegistry;
 using log::ReadableLogSegment;
 using std::shared_ptr;
 using strings::Substitute;
-using tablet::ColumnDataPB;
-using tablet::DeltaDataPB;
-using tablet::RowSetDataPB;
 using tablet::TabletMetadata;
 using tablet::TabletPeer;
-using tablet::TabletSuperBlockPB;
 
 TabletCopySourceSession::TabletCopySourceSession(
     const scoped_refptr<TabletPeer>& tablet_peer, std::string session_id,
@@ -260,18 +255,17 @@ Status TabletCopySourceSession::GetBlockPiece(const BlockId& block_id,
 }
 
 Status TabletCopySourceSession::GetLogSegmentPiece(uint64_t segment_seqno,
-                                                  uint64_t offset, int64_t client_maxlen,
-                                                  std::string* data, int64_t* block_file_size,
-                                                  TabletCopyErrorPB::Code* error_code) {
+                                                   uint64_t offset, int64_t client_maxlen,
+                                                   std::string* data, int64_t* log_file_size,
+                                                   TabletCopyErrorPB::Code* error_code) {
   ImmutableRandomAccessFileInfo* file_info;
   RETURN_NOT_OK(FindLogSegment(segment_seqno, &file_info, error_code));
   RETURN_NOT_OK(ReadFileChunkToBuf(file_info, offset, client_maxlen,
                                    Substitute("log segment $0", segment_seqno),
-                                   data, block_file_size, error_code));
+                                   data, log_file_size, error_code));
 
   // Note: We do not eagerly close log segment files, since we share ownership
   // of the LogSegment objects with the Log itself.
-
   return Status::OK();
 }
 


Mime
View raw message