accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From md...@apache.org
Subject [2/6] git commit: ACCUMULO-2768 Agitator not restarting all datanodes
Date Wed, 14 May 2014 14:58:00 GMT
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/master
Commit: 72fd01ff2cbe85b1e9d2908331308a41857591ed
Parents: 312856a
Author: Drew Farris <drew@apache.org>
Authored: Tue May 13 22:53:48 2014 -0400
Committer: Drew Farris <drew@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);


Mime
View raw message