hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sj...@apache.org
Subject hadoop git commit: HADOOP-10668. TestZKFailoverControllerStress#testExpireBackAndForth occasionally fails. Contributed by Ming Ma.
Date Fri, 06 Nov 2015 01:29:45 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.6 5a00b2310 -> 0b55634b9


HADOOP-10668. TestZKFailoverControllerStress#testExpireBackAndForth occasionally fails. Contributed
by Ming Ma.

(cherry picked from commit 7fc1f2f5cf4312d72aeffb1a9cef497d00c60adb)


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

Branch: refs/heads/branch-2.6
Commit: 0b55634b9ce1357e4ce1f1d130388afd4ff59aeb
Parents: 5a00b23
Author: cnauroth <cnauroth@apache.org>
Authored: Mon Jan 19 11:28:30 2015 -0800
Committer: Sangjin Lee <sjlee@apache.org>
Committed: Thu Nov 5 17:24:51 2015 -0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/ha/ZKFailoverController.java | 4 +++-
 .../src/test/java/org/apache/hadoop/ha/MiniZKFCCluster.java      | 4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/0b55634b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java
index 46c485b..f58c3f4 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java
@@ -153,7 +153,9 @@ public abstract class ZKFailoverController {
   public HAServiceTarget getLocalTarget() {
     return localTarget;
   }
-  
+
+  HAServiceState getServiceState() { return serviceState; }
+
   public int run(final String[] args) throws Exception {
     if (!localTarget.isAutoFailoverEnabled()) {
       LOG.fatal("Automatic failover is not enabled for " + localTarget + "." +

http://git-wip-us.apache.org/repos/asf/hadoop/blob/0b55634b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ha/MiniZKFCCluster.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ha/MiniZKFCCluster.java
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ha/MiniZKFCCluster.java
index b0d6d62..5aee611 100644
--- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ha/MiniZKFCCluster.java
+++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ha/MiniZKFCCluster.java
@@ -163,8 +163,8 @@ public class MiniZKFCCluster {
    */
   public void waitForHAState(int idx, HAServiceState state)
       throws Exception {
-    DummyHAService svc = getService(idx);
-    while (svc.state != state) {
+    DummyZKFC svc = getZkfc(idx);
+    while (svc.getServiceState() != state) {
       ctx.checkException();
       Thread.sleep(50);
     }


Mime
View raw message