Author: ecn
Date: Fri Mar 8 19:48:43 2013
New Revision: 1454511
URL: http://svn.apache.org/r1454511
Log:
ACCUMULO-262: added apocalypse test to Concurrent.xml
Added:
accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Apocalypse.java
(with props)
accumulo/branches/1.5/test/system/randomwalk/bin/apocalypse.sh (with
props)
Modified:
accumulo/branches/1.5/test/system/randomwalk/conf/modules/Concurrent.xml
Added:
accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Apocalypse.java
URL:
http://svn.apache.org/viewvc/accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Apocalypse.java?rev=1454511&view=auto
==============================================================================
---
accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Apocalypse.java
(added)
+++
accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Apocalypse.java
Fri Mar 8 19:48:43 2013
@@ -0,0 +1,17 @@
+package org.apache.accumulo.test.randomwalk.concurrent;
+
+import java.util.Properties;
+
+import org.apache.accumulo.test.randomwalk.State;
+import org.apache.accumulo.test.randomwalk.Test;
+
+public class Apocalypse extends Test {
+
+ @Override
+ public void visit(State state, Properties props) throws Exception {
+ Process exec = Runtime.getRuntime().exec(new String[]
{System.getenv("ACCUMULO_HOME") + "/test/system/randomwalk/bin/apocalypse.sh"});
+ if (exec.waitFor() != 0)
+ throw new RuntimeException("apocalypse.sh returned a non-zero response:
" + exec.exitValue());
+ }
+
+}
Propchange:
accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Apocalypse.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: accumulo/branches/1.5/test/system/randomwalk/bin/apocalypse.sh
URL:
http://svn.apache.org/viewvc/accumulo/branches/1.5/test/system/randomwalk/bin/apocalypse.sh?rev=1454511&view=auto
==============================================================================
--- accumulo/branches/1.5/test/system/randomwalk/bin/apocalypse.sh (added)
+++ accumulo/branches/1.5/test/system/randomwalk/bin/apocalypse.sh Fri Mar 8
19:48:43 2013
@@ -0,0 +1,49 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#copied below from hadoop-config.sh
+this="$0"
+while [ -h "$this" ]; do
+ ls=`ls -ld "$this"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '.*/.*' > /dev/null; then
+ this="$link"
+ else
+ this=`dirname "$this"`/"$link"
+ fi
+done
+bin=`dirname "$this"`
+script=`basename "$this"`
+bin=`cd "$bin"; pwd`
+this="$bin/$script"
+
+ACCUMULO_HOME=`dirname "$this"`/../../../..
+export ACCUMULO_HOME=`cd $ACCUMULO_HOME; pwd`
+
+if [ -f $ACCUMULO_HOME/conf/accumulo-env.sh ] ; then
+. $ACCUMULO_HOME/conf/accumulo-env.sh
+fi
+
+if [ -z $HADOOP_PREFIX ] ; then
+ echo "HADOOP_PREFIX is not set. Please make sure it's set globally."
+ exit 1
+fi
+
+echo 'killing all accumulo processes'
+pssh -h $ACCUMULO_HOME/conf/slaves "pkill -9 -f
app=[tmg].*org.apache.accumulo.start " < /dev/null
+pssh -h $ACCUMULO_HOME/conf/masters "pkill -9 -f
app=[tmg].*org.apache.accumulo.start " < /dev/null
+exit 0
Propchange: accumulo/branches/1.5/test/system/randomwalk/bin/apocalypse.sh
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: accumulo/branches/1.5/test/system/randomwalk/bin/apocalypse.sh
------------------------------------------------------------------------------
svn:executable = *
Modified:
accumulo/branches/1.5/test/system/randomwalk/conf/modules/Concurrent.xml
URL:
http://svn.apache.org/viewvc/accumulo/branches/1.5/test/system/randomwalk/conf/modules/Concurrent.xml?rev=1454511&r1=1454510&r2=1454511&view=diff
==============================================================================
--- accumulo/branches/1.5/test/system/randomwalk/conf/modules/Concurrent.xml
(original)
+++ accumulo/branches/1.5/test/system/randomwalk/conf/modules/Concurrent.xml
Fri Mar 8 19:48:43 2013
@@ -48,6 +48,7 @@
<edge id="ct.StartAll" weight="1000"/>
<edge id="ct.Shutdown" weight="10"/>
<edge id="ct.Config" weight="1000"/>
+ <edge id="ct.Apocalypse" weight="10"/>
<edge id="END" weight="1"/>
</node>
@@ -152,4 +153,8 @@
<edge id="ct.StartAll" weight="1"/>
</node>
+<node id="ct.Apocalypse">
+ <edge id="ct.StartAll" weight="1"/>
+</node>
+
</module>