You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by dr...@apache.org on 2014/05/14 05:22:10 UTC

[2/3] git commit: ACCUMULO-2768 Agitator not restarting all datanodes

ACCUMULO-2768 Agitator not restarting all datanodes


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

Branch: refs/heads/1.6.1-SNAPSHOT
Commit: 72fd01ff2cbe85b1e9d2908331308a41857591ed
Parents: 312856a
Author: Drew Farris <dr...@apache.org>
Authored: Tue May 13 22:53:48 2014 -0400
Committer: Drew Farris <dr...@apache.org>
Committed: Tue May 13 22:53:48 2014 -0400

----------------------------------------------------------------------
 test/system/continuous/datanode-agitator.pl | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/72fd01ff/test/system/continuous/datanode-agitator.pl
----------------------------------------------------------------------
diff --git a/test/system/continuous/datanode-agitator.pl b/test/system/continuous/datanode-agitator.pl
index acb5843..1f469b2 100755
--- a/test/system/continuous/datanode-agitator.pl
+++ b/test/system/continuous/datanode-agitator.pl
@@ -105,7 +105,7 @@ if ($minKill > $maxKill){
 while(1){
 
   $numToKill = int(rand($maxKill - $minKill + 1)) + $minKill;
-  %killed = {};
+  %killed = ();
   $server = "";
 
   for($i = 0; $i < $numToKill; $i++){
@@ -124,11 +124,15 @@ while(1){
 
   $nextsleep2 = int(rand($sleep2max - $sleep2)) + $sleep2;
   sleep($nextsleep2 * 60);
-  $t = strftime "%Y%m%d %H:%M:%S", localtime;
 
-  print STDERR "$t Starting datanode on $server\n";
-  # We can just start as we're the HDFS user
-  system("ssh $server '$HADOOP_PREFIX/sbin/hadoop-daemon.sh start datanode'");
+  foreach $restart (keys %killed) {
+
+    $t = strftime "%Y%m%d %H:%M:%S", localtime;
+
+    print STDERR "$t Starting datanode on $restart\n";
+    # We can just start as we're the HDFS user
+    system("ssh $restart '$HADOOP_PREFIX/sbin/hadoop-daemon.sh start datanode'");
+  }
 
   $nextsleep1 = int(rand($sleep1max - $sleep1)) + $sleep1;
   sleep($nextsleep1 * 60);