You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2013/02/06 15:35:48 UTC

svn commit: r1442989 - in /accumulo/trunk/test/system/continuous: agitator.pl continuous-env.sh.example

Author: ecn
Date: Wed Feb  6 14:35:48 2013
New Revision: 1442989

URL: http://svn.apache.org/viewvc?rev=1442989&view=rev
Log:
ACCUMULO-636 randomly kill datanodes

Modified:
    accumulo/trunk/test/system/continuous/agitator.pl
    accumulo/trunk/test/system/continuous/continuous-env.sh.example

Modified: accumulo/trunk/test/system/continuous/agitator.pl
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/continuous/agitator.pl?rev=1442989&r1=1442988&r2=1442989&view=diff
==============================================================================
--- accumulo/trunk/test/system/continuous/agitator.pl (original)
+++ accumulo/trunk/test/system/continuous/agitator.pl Wed Feb  6 14:35:48 2013
@@ -77,16 +77,37 @@ while(1){
 		$killed{$server} = 1;
 
 		$t = strftime "%Y%m%d %H:%M:%S", localtime;
-	
+
 		$rn = rand(1);
-		print STDERR "$t Killing $server\n";
-		system("$ACCUMULO_HOME/bin/stop-server.sh $server \"accumulo-start.*.jar\" tserver KILL");
+		$kill_tserver = 0;
+		$kill_datanode = 0;
+		if($rn <.33){
+			$kill_tserver = 1;
+			$kill_datanode = 1;
+		}elsif($rn < .66){
+			$kill_tserver = 1;
+			$kill_datanode = 0;
+		}else{
+			$kill_tserver = 0;
+			$kill_datanode = 1;
+		}
+	
+		print STDERR "$t Killing $server $kill_tserver $kill_datanode\n";
+	        if($kill_tserver) {
+			system("$ACCUMULO_HOME/bin/stop-server.sh $server \"accumulo-start.*.jar\" tserver KILL");
+		}
+
+	        if($kill_datanode) {
+		        system("ssh $server pkill -9 -f [p]roc_datanode");
+		}
 	}
 
 	sleep($sleep2 * 60);
 	$t = strftime "%Y%m%d %H:%M:%S", localtime;
 	print STDERR "$t Running tup\n";
 	system("$ACCUMULO_HOME/bin/tup.sh");
+	print STDERR "$t Running start-dfs\n";
+	system("$HADOOP_PREFIX/bin/start-dfs.sh");
 
 	sleep($sleep1 * 60);
 }

Modified: accumulo/trunk/test/system/continuous/continuous-env.sh.example
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/continuous/continuous-env.sh.example?rev=1442989&r1=1442988&r2=1442989&view=diff
==============================================================================
--- accumulo/trunk/test/system/continuous/continuous-env.sh.example (original)
+++ accumulo/trunk/test/system/continuous/continuous-env.sh.example Wed Feb  6 14:35:48 2013
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 #set this to an absolute path that exist on every machine
-HADOOP_HOME=/opt/hadoop
+HADOOP_PREFIX=/opt/hadoop
 ACCUMULO_HOME=/opt/accumulo
 JAVA_HOME=/opt/java
 ZOOKEEPER_HOME=/opt/zookeeper