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 2015/06/05 15:42:15 UTC
accumulo git commit: ACCUMULO-3871 work around data stored in jars,
and not on the fs. Move unit test resources back to src/test.
Repository: accumulo
Updated Branches:
refs/heads/master 562c2e2ad -> effc692dd
ACCUMULO-3871 work around data stored in jars, and not on the fs. Move unit test resources back to src/test.
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/effc692d
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/effc692d
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/effc692d
Branch: refs/heads/master
Commit: effc692dd5869d78c24a1b694666f51e039e65f9
Parents: 562c2e2
Author: Eric C. Newton <er...@gmail.com>
Authored: Fri Jun 5 09:42:04 2015 -0400
Committer: Eric C. Newton <er...@gmail.com>
Committed: Fri Jun 5 09:42:04 2015 -0400
----------------------------------------------------------------------
.../org/apache/accumulo/harness/TestingKdc.java | 1 +
.../accumulo/test/IntegrationTestMapReduce.java | 3 +-
.../test/MasterRepairsDualAssignmentIT.java | 5 +-
.../org/apache/accumulo/test/ShellServerIT.java | 4 +-
.../accumulo/test/UserCompactionStrategyIT.java | 17 ++++-
.../accumulo/test/functional/ClassLoaderIT.java | 20 +++++-
.../functional/ConfigurableCompactionIT.java | 12 +++-
.../test/functional/MonitorLoggingIT.java | 4 +-
test/src/main/resources/randomwalk/Basic.xml | 37 -----------
test/src/main/resources/randomwalk/Simple.xml | 43 ------------
test/src/main/resources/randomwalk/module.xsd | 69 --------------------
test/src/test/resources/randomwalk/Basic.xml | 37 +++++++++++
test/src/test/resources/randomwalk/Simple.xml | 43 ++++++++++++
test/src/test/resources/randomwalk/module.xsd | 69 ++++++++++++++++++++
14 files changed, 202 insertions(+), 162 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/effc692d/test/src/main/java/org/apache/accumulo/harness/TestingKdc.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/harness/TestingKdc.java b/test/src/main/java/org/apache/accumulo/harness/TestingKdc.java
index 9471274..e05b9b0 100644
--- a/test/src/main/java/org/apache/accumulo/harness/TestingKdc.java
+++ b/test/src/main/java/org/apache/accumulo/harness/TestingKdc.java
@@ -56,6 +56,7 @@ public class TestingKdc {
private static File computeKdcDir() {
File targetDir = new File(System.getProperty("user.dir"), "target");
+ targetDir.mkdirs();
Assert.assertTrue("Could not find Maven target directory: " + targetDir, targetDir.exists() && targetDir.isDirectory());
// Create the directories: target/kerberos/minikdc
http://git-wip-us.apache.org/repos/asf/accumulo/blob/effc692d/test/src/main/java/org/apache/accumulo/test/IntegrationTestMapReduce.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/IntegrationTestMapReduce.java b/test/src/main/java/org/apache/accumulo/test/IntegrationTestMapReduce.java
index e33f3a9..47482db 100644
--- a/test/src/main/java/org/apache/accumulo/test/IntegrationTestMapReduce.java
+++ b/test/src/main/java/org/apache/accumulo/test/IntegrationTestMapReduce.java
@@ -52,6 +52,7 @@ public class IntegrationTestMapReduce extends Configured implements Tool {
if (className.trim().isEmpty()) {
return;
}
+ log.info("Running test {}", className);
Class<? extends Object> test = null;
try {
test = Class.forName(className);
@@ -82,7 +83,7 @@ public class IntegrationTestMapReduce extends Configured implements Tool {
}
});
- log.info("Running test {}", className);
+ context.setStatus(test.getSimpleName());
try {
Result result = core.run(test);
if (result.wasSuccessful()) {
http://git-wip-us.apache.org/repos/asf/accumulo/blob/effc692d/test/src/main/java/org/apache/accumulo/test/MasterRepairsDualAssignmentIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/MasterRepairsDualAssignmentIT.java b/test/src/main/java/org/apache/accumulo/test/MasterRepairsDualAssignmentIT.java
index 9babeba..a4f067e 100644
--- a/test/src/main/java/org/apache/accumulo/test/MasterRepairsDualAssignmentIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/MasterRepairsDualAssignmentIT.java
@@ -40,6 +40,7 @@ import org.apache.accumulo.core.security.TablePermission;
import org.apache.accumulo.fate.util.UtilWaitThread;
import org.apache.accumulo.minicluster.ServerType;
import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
+import org.apache.accumulo.server.master.state.ClosableIterator;
import org.apache.accumulo.server.master.state.MetaDataStateStore;
import org.apache.accumulo.server.master.state.RootTabletStateStore;
import org.apache.accumulo.server.master.state.TServerInstance;
@@ -147,8 +148,8 @@ public class MasterRepairsDualAssignmentIT extends ConfigurableMacBase {
private void waitForCleanStore(MetaDataStateStore store) {
while (true) {
- try {
- Iterators.size(store.iterator());
+ try (ClosableIterator<TabletLocationState> iter = store.iterator()) {
+ Iterators.size(iter);
} catch (Exception ex) {
System.out.println(ex);
UtilWaitThread.sleep(250);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/effc692d/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java b/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
index 7740492..e01de42 100644
--- a/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
@@ -1378,11 +1378,11 @@ public class ShellServerIT extends SharedMiniClusterBase {
File fooFilterJar = File.createTempFile("FooFilter", ".jar", new File(rootPath));
- FileUtils.copyURLToFile(this.getClass().getResource("/FooFilter.jar"), fooFilterJar);
+ FileUtils.copyInputStreamToFile(this.getClass().getResourceAsStream("/FooFilter.jar"), fooFilterJar);
fooFilterJar.deleteOnExit();
File fooConstraintJar = File.createTempFile("FooConstraint", ".jar", new File(rootPath));
- FileUtils.copyURLToFile(this.getClass().getResource("/FooConstraint.jar"), fooConstraintJar);
+ FileUtils.copyInputStreamToFile(this.getClass().getResourceAsStream("/FooConstraint.jar"), fooConstraintJar);
fooConstraintJar.deleteOnExit();
ts.exec("config -s " + Property.VFS_CONTEXT_CLASSPATH_PROPERTY.getKey() + "cx1=" + fooFilterJar.toURI().toString() + ","
http://git-wip-us.apache.org/repos/asf/accumulo/blob/effc692d/test/src/main/java/org/apache/accumulo/test/UserCompactionStrategyIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/UserCompactionStrategyIT.java b/test/src/main/java/org/apache/accumulo/test/UserCompactionStrategyIT.java
index fa9e642..127f779 100644
--- a/test/src/main/java/org/apache/accumulo/test/UserCompactionStrategyIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/UserCompactionStrategyIT.java
@@ -17,6 +17,8 @@
package org.apache.accumulo.test;
+import java.io.File;
+import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Map;
@@ -41,8 +43,10 @@ import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.iterators.user.RegExFilter;
import org.apache.accumulo.core.security.Authorizations;
import org.apache.accumulo.harness.AccumuloClusterHarness;
+import org.apache.accumulo.test.functional.ConfigurableCompactionIT;
import org.apache.accumulo.test.functional.FunctionalTestUtils;
import org.apache.accumulo.test.functional.SlowIterator;
+import org.apache.commons.io.FileUtils;
import org.apache.hadoop.io.Text;
import org.junit.Assert;
import org.junit.Assume;
@@ -128,9 +132,12 @@ public class UserCompactionStrategyIT extends AccumuloClusterHarness {
final Connector c = getConnector();
final String tableName = getUniqueNames(1)[0];
+ File target = new File(System.getProperty("user.dir"), "target");
+ target.mkdirs();
+ Assert.assertTrue(target.exists() && target.isDirectory());
+ File destFile = installJar(target, "/TestCompactionStrat.jar");
c.tableOperations().create(tableName);
- c.instanceOperations().setProperty(Property.VFS_CONTEXT_CLASSPATH_PROPERTY.getKey() + "context1",
- System.getProperty("user.dir") + "/src/test/resources/TestCompactionStrat.jar");
+ c.instanceOperations().setProperty(Property.VFS_CONTEXT_CLASSPATH_PROPERTY.getKey() + "context1", destFile.toString());
c.tableOperations().setProperty(tableName, Property.TABLE_CLASSPATH.getKey(), "context1");
c.tableOperations().addSplits(tableName, new TreeSet<Text>(Arrays.asList(new Text("efg"))));
@@ -154,6 +161,12 @@ public class UserCompactionStrategyIT extends AccumuloClusterHarness {
Assert.assertEquals(2, FunctionalTestUtils.countRFiles(c, tableName));
}
+ private static File installJar(File destDir, String jarFile) throws IOException {
+ File destName = new File(destDir, new File(jarFile).getName());
+ FileUtils.copyInputStreamToFile(ConfigurableCompactionIT.class.getResourceAsStream(jarFile), destName);
+ return destName;
+ }
+
@Test
public void testIterators() throws Exception {
// test compaction strategy + iterators
http://git-wip-us.apache.org/repos/asf/accumulo/blob/effc692d/test/src/main/java/org/apache/accumulo/test/functional/ClassLoaderIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ClassLoaderIT.java b/test/src/main/java/org/apache/accumulo/test/functional/ClassLoaderIT.java
index c06feed..f1fb91c 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ClassLoaderIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ClassLoaderIT.java
@@ -20,6 +20,8 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
+import java.io.IOException;
+import java.io.InputStream;
import java.util.Collections;
import java.util.EnumSet;
import java.util.Iterator;
@@ -40,6 +42,7 @@ import org.apache.accumulo.core.util.CachedConfiguration;
import org.apache.accumulo.core.util.UtilWaitThread;
import org.apache.accumulo.harness.AccumuloClusterHarness;
import org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl;
+import org.apache.hadoop.fs.FSDataOutputStream;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.hamcrest.CoreMatchers;
@@ -65,6 +68,19 @@ public class ClassLoaderIT extends AccumuloClusterHarness {
rootPath = mac.getConfig().getDir().getAbsolutePath();
}
+ private static void copyStreamToFileSystem(FileSystem fs, InputStream stream, Path path) throws IOException {
+ byte[] buffer = new byte[10 * 1024];
+ try (FSDataOutputStream dest = fs.create(path); InputStream closeMe = stream) {
+ while (true) {
+ int n = stream.read(buffer, 0, buffer.length);
+ if (n <= 0) {
+ break;
+ }
+ dest.write(buffer, 0, n);
+ }
+ }
+ }
+
@Test
public void test() throws Exception {
Connector c = getConnector();
@@ -78,7 +94,7 @@ public class ClassLoaderIT extends AccumuloClusterHarness {
scanCheck(c, tableName, "Test");
FileSystem fs = FileSystem.get(CachedConfiguration.getInstance());
Path jarPath = new Path(rootPath + "/lib/ext/Test.jar");
- fs.copyFromLocalFile(new Path(System.getProperty("user.dir") + "/src/test/resources/TestCombinerX.jar"), jarPath);
+ copyStreamToFileSystem(fs, this.getClass().getResourceAsStream("/TestCombinerX.jar"), jarPath);
UtilWaitThread.sleep(1000);
IteratorSetting is = new IteratorSetting(10, "TestCombiner", "org.apache.accumulo.test.functional.TestCombiner");
Combiner.setColumns(is, Collections.singletonList(new IteratorSetting.Column("cf")));
@@ -86,7 +102,7 @@ public class ClassLoaderIT extends AccumuloClusterHarness {
UtilWaitThread.sleep(ZOOKEEPER_PROPAGATION_TIME);
scanCheck(c, tableName, "TestX");
fs.delete(jarPath, true);
- fs.copyFromLocalFile(new Path(System.getProperty("user.dir") + "/src/test/resources/TestCombinerY.jar"), jarPath);
+ copyStreamToFileSystem(fs, this.getClass().getResourceAsStream("/TestCombinerY.jar"), jarPath);
UtilWaitThread.sleep(5000);
scanCheck(c, tableName, "TestY");
fs.delete(jarPath, true);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/effc692d/test/src/main/java/org/apache/accumulo/test/functional/ConfigurableCompactionIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ConfigurableCompactionIT.java b/test/src/main/java/org/apache/accumulo/test/functional/ConfigurableCompactionIT.java
index 66695e0..84c7206 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ConfigurableCompactionIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ConfigurableCompactionIT.java
@@ -18,6 +18,7 @@ package org.apache.accumulo.test.functional;
import static org.junit.Assert.assertTrue;
+import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
@@ -39,6 +40,7 @@ import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
import org.apache.accumulo.tserver.compaction.CompactionPlan;
import org.apache.accumulo.tserver.compaction.CompactionStrategy;
import org.apache.accumulo.tserver.compaction.MajorCompactionRequest;
+import org.apache.commons.io.FileUtils;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.Text;
import org.junit.Assert;
@@ -99,9 +101,9 @@ public class ConfigurableCompactionIT extends ConfigurableMacBase {
public void testPerTableClasspath() throws Exception {
final Connector c = getConnector();
final String tableName = getUniqueNames(1)[0];
+ File destFile = installJar(getCluster().getConfig().getAccumuloDir(), "/TestCompactionStrat.jar");
c.tableOperations().create(tableName);
- c.instanceOperations().setProperty(Property.VFS_CONTEXT_CLASSPATH_PROPERTY.getKey() + "context1",
- System.getProperty("user.dir") + "/src/test/resources/TestCompactionStrat.jar");
+ c.instanceOperations().setProperty(Property.VFS_CONTEXT_CLASSPATH_PROPERTY.getKey() + "context1", destFile.toString());
c.tableOperations().setProperty(tableName, Property.TABLE_MAJC_RATIO.getKey(), "10");
c.tableOperations().setProperty(tableName, Property.TABLE_CLASSPATH.getKey(), "context1");
// EfgCompactionStrat will only compact a tablet w/ end row of 'efg'. No other tablets are compacted.
@@ -117,6 +119,12 @@ public class ConfigurableCompactionIT extends ConfigurableMacBase {
}
}
+ private static File installJar(File destDir, String jarFile) throws IOException {
+ File destName = new File(destDir, new File(jarFile).getName());
+ FileUtils.copyInputStreamToFile(ConfigurableCompactionIT.class.getResourceAsStream(jarFile), destName);
+ return destName;
+ }
+
private void writeFlush(Connector conn, String tablename, String row) throws Exception {
BatchWriter bw = conn.createBatchWriter(tablename, new BatchWriterConfig());
Mutation m = new Mutation(row);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/effc692d/test/src/main/java/org/apache/accumulo/test/functional/MonitorLoggingIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/MonitorLoggingIT.java b/test/src/main/java/org/apache/accumulo/test/functional/MonitorLoggingIT.java
index c59c52e..2cf9b84 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/MonitorLoggingIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/MonitorLoggingIT.java
@@ -43,8 +43,8 @@ public class MonitorLoggingIT extends ConfigurableMacBase {
cfg.setNumTservers(1);
File confDir = cfg.getConfDir();
try {
- FileUtils.copyFileToDirectory(new File(MonitorLoggingIT.class.getResource("/conf/generic_logger.xml").toURI()), confDir);
- FileUtils.copyFileToDirectory(new File(MonitorLoggingIT.class.getResource("/conf/monitor_logger.xml").toURI()), confDir);
+ FileUtils.copyInputStreamToFile(MonitorLoggingIT.class.getResourceAsStream("/conf/generic_logger.xml"), new File(confDir, "generic_logger.xml"));
+ FileUtils.copyInputStreamToFile(MonitorLoggingIT.class.getResourceAsStream("/conf/monitor_logger.xml"), new File(confDir, "monitor_logger.xml"));
} catch (Exception e) {
log.error("Failed to copy Log4J XML files to conf dir", e);
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/effc692d/test/src/main/resources/randomwalk/Basic.xml
----------------------------------------------------------------------
diff --git a/test/src/main/resources/randomwalk/Basic.xml b/test/src/main/resources/randomwalk/Basic.xml
deleted file mode 100644
index 2dead02..0000000
--- a/test/src/main/resources/randomwalk/Basic.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<module>
-
-<package prefix="test" value="org.apache.accumulo.test.randomwalk.unit"/>
-
-<init id="test.CreateTable"/>
-
-<node id="test.CreateTable">
- <edge id="unit/Simple.xml" weight="1"/>
-</node>
-
-<node id="unit/Simple.xml">
- <edge id="unit/Simple.xml" weight="3"/>
- <edge id="test.DeleteTable" weight="1"/>
-</node>
-
-<node id="test.DeleteTable">
- <edge id="END" weight="1"/>
-</node>
-
-</module>
http://git-wip-us.apache.org/repos/asf/accumulo/blob/effc692d/test/src/main/resources/randomwalk/Simple.xml
----------------------------------------------------------------------
diff --git a/test/src/main/resources/randomwalk/Simple.xml b/test/src/main/resources/randomwalk/Simple.xml
deleted file mode 100644
index cad940e..0000000
--- a/test/src/main/resources/randomwalk/Simple.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<module>
-
-<package prefix="test" value="org.apache.accumulo.test.randomwalk.unit"/>
-
-<init id="dummy.all"/>
-
-<node id="dummy.all">
- <edge id="test.Ingest" weight="1"/>
- <edge id="test.Verify" weight="1"/>
- <edge id="test.Scan" weight="1"/>
- <edge id="END" weight="1"/>
-</node>
-
-<node id="test.Ingest">
- <edge id="dummy.all" weight="1"/>
-</node>
-
-<node id="test.Verify">
- <edge id="dummy.all" weight="1"/>
-</node>
-
-<node id="test.Scan">
- <edge id="dummy.all" weight="1"/>
-</node>
-
-</module>
http://git-wip-us.apache.org/repos/asf/accumulo/blob/effc692d/test/src/main/resources/randomwalk/module.xsd
----------------------------------------------------------------------
diff --git a/test/src/main/resources/randomwalk/module.xsd b/test/src/main/resources/randomwalk/module.xsd
deleted file mode 100644
index bcdaaae0..0000000
--- a/test/src/main/resources/randomwalk/module.xsd
+++ /dev/null
@@ -1,69 +0,0 @@
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-<!--
- 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.
--->
-
- <xsd:element name="module" type="ModuleType"/>
-
- <xsd:complexType name="ModuleType">
- <xsd:sequence>
- <xsd:element name="package" type="PrefixType" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="fixture" type="InitType" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="init" type="InitType"/>
- <xsd:element name="node" type="NodeType" minOccurs="1" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="PrefixType">
- <xsd:attribute name="prefix" type="xsd:string"/>
- <xsd:attribute name="value" type="xsd:string"/>
- </xsd:complexType>
-
- <xsd:complexType name="InitType">
- <xsd:attribute name="id" type="xsd:string"/>
- <xsd:attribute name="maxHops" type="xsd:nonNegativeInteger"/>
- <xsd:attribute name="maxSec" type="xsd:nonNegativeInteger"/>
- <xsd:attribute name="teardown" type="xsd:boolean"/>
- </xsd:complexType>
-
- <xsd:complexType name="NodeType">
- <xsd:sequence>
- <xsd:element name="alias" type="AliasType" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="edge" type="EdgeType" minOccurs="1" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:string"/>
- <xsd:attribute name="src" type="xsd:string"/>
- <xsd:attribute name="maxHops" type="xsd:nonNegativeInteger"/>
- <xsd:attribute name="maxSec" type="xsd:nonNegativeInteger"/>
- <xsd:attribute name="teardown" type="xsd:boolean"/>
- </xsd:complexType>
-
- <xsd:complexType name="EdgeType">
- <xsd:attribute name="id" type="xsd:string"/>
- <xsd:attribute name="weight" type="xsd:positiveInteger"/>
- </xsd:complexType>
-
- <xsd:complexType name="AliasType">
- <xsd:attribute name="name" type="xsd:string"/>
- </xsd:complexType>
-
- <xsd:complexType name="PropertyType">
- <xsd:attribute name="key" type="xsd:string"/>
- <xsd:attribute name="value" type="xsd:string"/>
- </xsd:complexType>
-
-</xsd:schema>
http://git-wip-us.apache.org/repos/asf/accumulo/blob/effc692d/test/src/test/resources/randomwalk/Basic.xml
----------------------------------------------------------------------
diff --git a/test/src/test/resources/randomwalk/Basic.xml b/test/src/test/resources/randomwalk/Basic.xml
new file mode 100644
index 0000000..2dead02
--- /dev/null
+++ b/test/src/test/resources/randomwalk/Basic.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<module>
+
+<package prefix="test" value="org.apache.accumulo.test.randomwalk.unit"/>
+
+<init id="test.CreateTable"/>
+
+<node id="test.CreateTable">
+ <edge id="unit/Simple.xml" weight="1"/>
+</node>
+
+<node id="unit/Simple.xml">
+ <edge id="unit/Simple.xml" weight="3"/>
+ <edge id="test.DeleteTable" weight="1"/>
+</node>
+
+<node id="test.DeleteTable">
+ <edge id="END" weight="1"/>
+</node>
+
+</module>
http://git-wip-us.apache.org/repos/asf/accumulo/blob/effc692d/test/src/test/resources/randomwalk/Simple.xml
----------------------------------------------------------------------
diff --git a/test/src/test/resources/randomwalk/Simple.xml b/test/src/test/resources/randomwalk/Simple.xml
new file mode 100644
index 0000000..cad940e
--- /dev/null
+++ b/test/src/test/resources/randomwalk/Simple.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<module>
+
+<package prefix="test" value="org.apache.accumulo.test.randomwalk.unit"/>
+
+<init id="dummy.all"/>
+
+<node id="dummy.all">
+ <edge id="test.Ingest" weight="1"/>
+ <edge id="test.Verify" weight="1"/>
+ <edge id="test.Scan" weight="1"/>
+ <edge id="END" weight="1"/>
+</node>
+
+<node id="test.Ingest">
+ <edge id="dummy.all" weight="1"/>
+</node>
+
+<node id="test.Verify">
+ <edge id="dummy.all" weight="1"/>
+</node>
+
+<node id="test.Scan">
+ <edge id="dummy.all" weight="1"/>
+</node>
+
+</module>
http://git-wip-us.apache.org/repos/asf/accumulo/blob/effc692d/test/src/test/resources/randomwalk/module.xsd
----------------------------------------------------------------------
diff --git a/test/src/test/resources/randomwalk/module.xsd b/test/src/test/resources/randomwalk/module.xsd
new file mode 100644
index 0000000..bcdaaae0
--- /dev/null
+++ b/test/src/test/resources/randomwalk/module.xsd
@@ -0,0 +1,69 @@
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+<!--
+ 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.
+-->
+
+ <xsd:element name="module" type="ModuleType"/>
+
+ <xsd:complexType name="ModuleType">
+ <xsd:sequence>
+ <xsd:element name="package" type="PrefixType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="fixture" type="InitType" minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="init" type="InitType"/>
+ <xsd:element name="node" type="NodeType" minOccurs="1" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="PrefixType">
+ <xsd:attribute name="prefix" type="xsd:string"/>
+ <xsd:attribute name="value" type="xsd:string"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="InitType">
+ <xsd:attribute name="id" type="xsd:string"/>
+ <xsd:attribute name="maxHops" type="xsd:nonNegativeInteger"/>
+ <xsd:attribute name="maxSec" type="xsd:nonNegativeInteger"/>
+ <xsd:attribute name="teardown" type="xsd:boolean"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="NodeType">
+ <xsd:sequence>
+ <xsd:element name="alias" type="AliasType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="edge" type="EdgeType" minOccurs="1" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:string"/>
+ <xsd:attribute name="src" type="xsd:string"/>
+ <xsd:attribute name="maxHops" type="xsd:nonNegativeInteger"/>
+ <xsd:attribute name="maxSec" type="xsd:nonNegativeInteger"/>
+ <xsd:attribute name="teardown" type="xsd:boolean"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="EdgeType">
+ <xsd:attribute name="id" type="xsd:string"/>
+ <xsd:attribute name="weight" type="xsd:positiveInteger"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="AliasType">
+ <xsd:attribute name="name" type="xsd:string"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="PropertyType">
+ <xsd:attribute name="key" type="xsd:string"/>
+ <xsd:attribute name="value" type="xsd:string"/>
+ </xsd:complexType>
+
+</xsd:schema>