Repository: bigtop
Updated Branches:
  refs/heads/master 7d406eebe -> d6c5f77b4


BIGTOP-1513. FailureExecutor.groovy is in the wrong module, causing compiler 
errors.


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

Branch: refs/heads/master
Commit: d6c5f77b459e05bdc8db149964040abcbb9a17d6
Parents: 7d406ee
Author: Konstantin Boudnik <[email protected]>
Authored: Tue Nov 11 13:19:43 2014 -0800
Committer: Konstantin Boudnik <[email protected]>
Committed: Tue Nov 11 13:19:43 2014 -0800

----------------------------------------------------------------------
 .../itest/failures/FailureExecutor.groovy       | 76 ++++++++++++++++++++
 .../hadoop/mapreduce/TestHadoopExamples.groovy  |  2 +-
 .../itest/iolongevity/FailureExecutor.groovy    | 76 --------------------
 3 files changed, 77 insertions(+), 77 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/d6c5f77b/bigtop-test-framework/src/main/groovy/org/apache/bigtop/itest/failures/FailureExecutor.groovy
----------------------------------------------------------------------
diff --git 
a/bigtop-test-framework/src/main/groovy/org/apache/bigtop/itest/failures/FailureExecutor.groovy
 
b/bigtop-test-framework/src/main/groovy/org/apache/bigtop/itest/failures/FailureExecutor.groovy
new file mode 100644
index 0000000..79212b2
--- /dev/null
+++ 
b/bigtop-test-framework/src/main/groovy/org/apache/bigtop/itest/failures/FailureExecutor.groovy
@@ -0,0 +1,76 @@
+package org.apache.bigtop.itest.failures
+
+import org.apache.bigtop.itest.failures.FailureVars
+import org.apache.bigtop.itest.failures.NetworkShutdownFailure
+import org.apache.bigtop.itest.failures.ServiceKilledFailure
+import org.apache.bigtop.itest.failures.ServiceRestartFailure
+import org.apache.bigtop.itest.failures.FailureConstants
+import org.apache.bigtop.itest.shell.OS
+import org.junit.Test
+import org.apache.bigtop.itest.shell.Shell
+
+/**
+ * A runnable that executes the cluster failure threads.
+ * Used to run in parallel to hadoop jobs to test their completion.
+ */
+public class FailureExecutor implements Runnable {
+
+  private String restart = FailureVars.instance.getServiceRestart();
+  private String kill = FailureVars.instance.getServiceKill();
+  private String shutdown = FailureVars.instance.getNetworkShutdown();
+  private String testHost = FailureVars.instance.getTestHost();
+  private String testRemoteHost = FailureVars.instance.getTestRemoteHost();
+  private long failureDelay = FailureVars.instance.getFailureDelay();
+  private long startDelay = FailureVars.instance.getStartDelay();
+
+  Thread restartThread = null;
+  Thread killThread = null;
+  Thread shutdownThread = null;
+
+  public void run() {
+    if (startDelay > 0) {
+      try {
+        Thread.sleep(startDelay)
+      } catch (InterruptedException e) {}
+    }
+    if(restart != null && restart.equals("true")) {
+      serviceRestartExec();
+    }
+    if(kill != null && kill.equals("true")) {
+      serviceKillExec();
+    }
+    if(shutdown != null && shutdown.equals("true")) {
+      networkShutdownExec();
+    }
+  }
+
+  public void serviceRestartExec() {
+    System.out.println("Restarting services...")
+    def srf = new ServiceRestartFailure([testHost],
+      FailureVars.instance.CRON_SERVICE, failureDelay);
+    restartThread = new Thread(srf, "restartThread");
+    restartThread.start();
+    restartThread.join();
+    System.out.println("Finished restarting services.\n");
+  }
+
+  public void serviceKillExec() {
+    System.out.println("Killing services....")
+    def skf = new ServiceKilledFailure([testHost],
+      FailureVars.instance.CRON_SERVICE, failureDelay);
+    killThread = new Thread(skf, "killThread");
+    killThread.start();
+    killThread.join();
+    System.out.println("Finished killing services.\n");
+  }
+
+  public void networkShutdownExec() {
+    System.out.println("Shutting down network...")
+    def nsf = new NetworkShutdownFailure(testHost,
+      [testRemoteHost], failureDelay);
+    shutdownThread = new Thread(nsf)
+    shutdownThread.start();
+    shutdownThread.join();
+    System.out.println("Finished restarting network.\n");
+  }
+}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/d6c5f77b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/mapreduce/TestHadoopExamples.groovy
----------------------------------------------------------------------
diff --git 
a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/mapreduce/TestHadoopExamples.groovy
 
b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/mapreduce/TestHadoopExamples.groovy
index 213250c..b4dff17 100644
--- 
a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/mapreduce/TestHadoopExamples.groovy
+++ 
b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/mapreduce/TestHadoopExamples.groovy
@@ -18,7 +18,7 @@
 
 package org.apache.bigtop.itest.hadoop.mapreduce
 
-import org.apache.bigtop.itest.failures.FailureVars
+import org.apache.bigtop.itest.failures.FailureExecutor
 import org.junit.BeforeClass
 import org.junit.AfterClass
 import static org.junit.Assert.assertNotNull

http://git-wip-us.apache.org/repos/asf/bigtop/blob/d6c5f77b/bigtop-tests/test-artifacts/longevity/src/main/groovy/org/apache/bigtop/itest/iolongevity/FailureExecutor.groovy
----------------------------------------------------------------------
diff --git 
a/bigtop-tests/test-artifacts/longevity/src/main/groovy/org/apache/bigtop/itest/iolongevity/FailureExecutor.groovy
 
b/bigtop-tests/test-artifacts/longevity/src/main/groovy/org/apache/bigtop/itest/iolongevity/FailureExecutor.groovy
deleted file mode 100644
index 79212b2..0000000
--- 
a/bigtop-tests/test-artifacts/longevity/src/main/groovy/org/apache/bigtop/itest/iolongevity/FailureExecutor.groovy
+++ /dev/null
@@ -1,76 +0,0 @@
-package org.apache.bigtop.itest.failures
-
-import org.apache.bigtop.itest.failures.FailureVars
-import org.apache.bigtop.itest.failures.NetworkShutdownFailure
-import org.apache.bigtop.itest.failures.ServiceKilledFailure
-import org.apache.bigtop.itest.failures.ServiceRestartFailure
-import org.apache.bigtop.itest.failures.FailureConstants
-import org.apache.bigtop.itest.shell.OS
-import org.junit.Test
-import org.apache.bigtop.itest.shell.Shell
-
-/**
- * A runnable that executes the cluster failure threads.
- * Used to run in parallel to hadoop jobs to test their completion.
- */
-public class FailureExecutor implements Runnable {
-
-  private String restart = FailureVars.instance.getServiceRestart();
-  private String kill = FailureVars.instance.getServiceKill();
-  private String shutdown = FailureVars.instance.getNetworkShutdown();
-  private String testHost = FailureVars.instance.getTestHost();
-  private String testRemoteHost = FailureVars.instance.getTestRemoteHost();
-  private long failureDelay = FailureVars.instance.getFailureDelay();
-  private long startDelay = FailureVars.instance.getStartDelay();
-
-  Thread restartThread = null;
-  Thread killThread = null;
-  Thread shutdownThread = null;
-
-  public void run() {
-    if (startDelay > 0) {
-      try {
-        Thread.sleep(startDelay)
-      } catch (InterruptedException e) {}
-    }
-    if(restart != null && restart.equals("true")) {
-      serviceRestartExec();
-    }
-    if(kill != null && kill.equals("true")) {
-      serviceKillExec();
-    }
-    if(shutdown != null && shutdown.equals("true")) {
-      networkShutdownExec();
-    }
-  }
-
-  public void serviceRestartExec() {
-    System.out.println("Restarting services...")
-    def srf = new ServiceRestartFailure([testHost],
-      FailureVars.instance.CRON_SERVICE, failureDelay);
-    restartThread = new Thread(srf, "restartThread");
-    restartThread.start();
-    restartThread.join();
-    System.out.println("Finished restarting services.\n");
-  }
-
-  public void serviceKillExec() {
-    System.out.println("Killing services....")
-    def skf = new ServiceKilledFailure([testHost],
-      FailureVars.instance.CRON_SERVICE, failureDelay);
-    killThread = new Thread(skf, "killThread");
-    killThread.start();
-    killThread.join();
-    System.out.println("Finished killing services.\n");
-  }
-
-  public void networkShutdownExec() {
-    System.out.println("Shutting down network...")
-    def nsf = new NetworkShutdownFailure(testHost,
-      [testRemoteHost], failureDelay);
-    shutdownThread = new Thread(nsf)
-    shutdownThread.start();
-    shutdownThread.join();
-    System.out.println("Finished restarting network.\n");
-  }
-}

Reply via email to