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: [mini-cluster] fixed typos in WaitForReplicaCount()
Date Tue, 21 Feb 2017 10:33:41 GMT
[mini-cluster] fixed typos in WaitForReplicaCount()

Fixed a couple of typos in ExternalMiniClusterFsInspector:
in implementation of WaitForReplicaCount() there was an extra call to
CountReplicasInMetadataDirs() and a typo in error message fmt string.

Change-Id: I4eef3e220fb3e330a8d7d29eb56adea1aab64ab0
Reviewed-on: http://gerrit.cloudera.org:8080/6090
Reviewed-by: Adar Dembo <adar@cloudera.com>
Tested-by: Kudu Jenkins
Reviewed-by: Mike Percy <mpercy@apache.org>


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

Branch: refs/heads/master
Commit: 2b0edbe31ee6e75bc454d6398ac2974fc275b1d5
Parents: 0767cd7
Author: Alexey Serbin <aserbin@cloudera.com>
Authored: Mon Feb 20 22:51:30 2017 -0800
Committer: Mike Percy <mpercy@apache.org>
Committed: Tue Feb 21 10:23:19 2017 +0000

----------------------------------------------------------------------
 .../external_mini_cluster_fs_inspector.cc             | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/2b0edbe3/src/kudu/integration-tests/external_mini_cluster_fs_inspector.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/external_mini_cluster_fs_inspector.cc b/src/kudu/integration-tests/external_mini_cluster_fs_inspector.cc
index 00441b1..3690f47 100644
--- a/src/kudu/integration-tests/external_mini_cluster_fs_inspector.cc
+++ b/src/kudu/integration-tests/external_mini_cluster_fs_inspector.cc
@@ -292,21 +292,21 @@ Status ExternalMiniClusterFsInspector::WaitForMinFilesInTabletWalDirOnTS(int
ind
 }
 
 Status ExternalMiniClusterFsInspector::WaitForReplicaCount(int expected, const MonoDelta&
timeout) {
-  Status s;
-  MonoTime deadline = MonoTime::Now() + timeout;
+  const MonoTime deadline = MonoTime::Now() + timeout;
   int found;
   while (true) {
     found = CountReplicasInMetadataDirs();
-    if (found == expected) return Status::OK();
-    if (CountReplicasInMetadataDirs() == expected) return Status::OK();
+    if (found == expected) {
+      return Status::OK();
+    }
     if (MonoTime::Now() > deadline) {
       break;
     }
     SleepFor(MonoDelta::FromMilliseconds(10));
   }
-  return Status::TimedOut(Substitute("Timed out waiting for a total replica count of $0.
"
-                                     "Found $2 replicas",
-                                     expected, found));
+  return Status::TimedOut(
+      Substitute("Timed out waiting for a total replica count of $0. "
+                 "Found $1 replicas", expected, found));
 }
 
 Status ExternalMiniClusterFsInspector::WaitForTabletDataStateOnTS(


Mime
View raw message