update new code and test in ipubmed
diff --git a/genomix/genomix-pregelix/data/PathTestSet/2/part-0 b/genomix/genomix-pregelix/data/PathTestSet/2/part-0
new file mode 100755
index 0000000..f7f0186
--- /dev/null
+++ b/genomix/genomix-pregelix/data/PathTestSet/2/part-0
Binary files differ
diff --git a/genomix/genomix-pregelix/data/PathTestSet/2/part-1 b/genomix/genomix-pregelix/data/PathTestSet/2/part-1
new file mode 100755
index 0000000..7b40564
--- /dev/null
+++ b/genomix/genomix-pregelix/data/PathTestSet/2/part-1
Binary files differ
diff --git a/genomix/genomix-pregelix/data/PathTestSet/3/part-0 b/genomix/genomix-pregelix/data/PathTestSet/3/part-0
new file mode 100755
index 0000000..055931c
--- /dev/null
+++ b/genomix/genomix-pregelix/data/PathTestSet/3/part-0
Binary files differ
diff --git a/genomix/genomix-pregelix/data/PathTestSet/3/part-1 b/genomix/genomix-pregelix/data/PathTestSet/3/part-1
new file mode 100755
index 0000000..4487006
--- /dev/null
+++ b/genomix/genomix-pregelix/data/PathTestSet/3/part-1
Binary files differ
diff --git a/genomix/genomix-pregelix/data/PathTestSet/4/part-0 b/genomix/genomix-pregelix/data/PathTestSet/4/part-0
new file mode 100755
index 0000000..d3baf9f
--- /dev/null
+++ b/genomix/genomix-pregelix/data/PathTestSet/4/part-0
Binary files differ
diff --git a/genomix/genomix-pregelix/data/PathTestSet/4/part-1 b/genomix/genomix-pregelix/data/PathTestSet/4/part-1
new file mode 100755
index 0000000..877d4f3
--- /dev/null
+++ b/genomix/genomix-pregelix/data/PathTestSet/4/part-1
Binary files differ
diff --git a/genomix/genomix-pregelix/data/PathTestSet/5/part-0 b/genomix/genomix-pregelix/data/PathTestSet/5/part-0
new file mode 100755
index 0000000..9a38afb
--- /dev/null
+++ b/genomix/genomix-pregelix/data/PathTestSet/5/part-0
Binary files differ
diff --git a/genomix/genomix-pregelix/data/PathTestSet/5/part-1 b/genomix/genomix-pregelix/data/PathTestSet/5/part-1
new file mode 100755
index 0000000..36a623e
--- /dev/null
+++ b/genomix/genomix-pregelix/data/PathTestSet/5/part-1
Binary files differ
diff --git a/genomix/genomix-pregelix/data/PathTestSet/6/part-0 b/genomix/genomix-pregelix/data/PathTestSet/6/part-0
new file mode 100755
index 0000000..fee737e
--- /dev/null
+++ b/genomix/genomix-pregelix/data/PathTestSet/6/part-0
Binary files differ
diff --git a/genomix/genomix-pregelix/data/PathTestSet/6/part-1 b/genomix/genomix-pregelix/data/PathTestSet/6/part-1
new file mode 100755
index 0000000..07f3452
--- /dev/null
+++ b/genomix/genomix-pregelix/data/PathTestSet/6/part-1
Binary files differ
diff --git a/genomix/genomix-pregelix/data/PathTestSet/7/part-0 b/genomix/genomix-pregelix/data/PathTestSet/7/part-0
new file mode 100755
index 0000000..3d4cc9b
--- /dev/null
+++ b/genomix/genomix-pregelix/data/PathTestSet/7/part-0
Binary files differ
diff --git a/genomix/genomix-pregelix/data/PathTestSet/7/part-1 b/genomix/genomix-pregelix/data/PathTestSet/7/part-1
new file mode 100755
index 0000000..b7fb670
--- /dev/null
+++ b/genomix/genomix-pregelix/data/PathTestSet/7/part-1
Binary files differ
diff --git a/genomix/genomix-pregelix/data/PathTestSet/8/part-0 b/genomix/genomix-pregelix/data/PathTestSet/8/part-0
new file mode 100755
index 0000000..778fbe8
--- /dev/null
+++ b/genomix/genomix-pregelix/data/PathTestSet/8/part-0
Binary files differ
diff --git a/genomix/genomix-pregelix/data/PathTestSet/8/part-1 b/genomix/genomix-pregelix/data/PathTestSet/8/part-1
new file mode 100755
index 0000000..a045391
--- /dev/null
+++ b/genomix/genomix-pregelix/data/PathTestSet/8/part-1
Binary files differ
diff --git a/genomix/genomix-pregelix/data/PathTestSet/9/part-0 b/genomix/genomix-pregelix/data/PathTestSet/9/part-0
new file mode 100755
index 0000000..b2d3f50
--- /dev/null
+++ b/genomix/genomix-pregelix/data/PathTestSet/9/part-0
Binary files differ
diff --git a/genomix/genomix-pregelix/data/PathTestSet/9/part-1 b/genomix/genomix-pregelix/data/PathTestSet/9/part-1
new file mode 100755
index 0000000..dacf119
--- /dev/null
+++ b/genomix/genomix-pregelix/data/PathTestSet/9/part-1
Binary files differ
diff --git a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/format/LogAlgorithmForPathMergeOutputFormat.java b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/format/LogAlgorithmForPathMergeOutputFormat.java
index 39e1e41..f0b2915 100644
--- a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/format/LogAlgorithmForPathMergeOutputFormat.java
+++ b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/format/LogAlgorithmForPathMergeOutputFormat.java
@@ -37,8 +37,8 @@
@Override
public void writeVertex(Vertex<KmerBytesWritable, ValueStateWritable, NullWritable, ?> vertex) throws IOException,
InterruptedException {
- if(vertex.getVertexValue().getState() != State.FINAL_DELETE
- && vertex.getVertexValue().getState() != State.END_VERTEX){
+ if(vertex.getVertexValue().getState() != State.END_VERTEX
+ && vertex.getVertexValue().getState() != State.MID_VERTEX){
getRecordWriter().write(vertex.getVertexId(),vertex.getVertexValue());
}
diff --git a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/TwoStepLogAlgorithmForPathMergeVertex.java b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/TwoStepLogAlgorithmForPathMergeVertex.java
index c5788ff..2353529 100644
--- a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/TwoStepLogAlgorithmForPathMergeVertex.java
+++ b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/TwoStepLogAlgorithmForPathMergeVertex.java
@@ -168,7 +168,7 @@
if(getVertexValue().getState() == State.START_VERTEX){
sendStartMsgToNextNode();
}
- else if(getVertexValue().getState() != State.END_VERTEX && getVertexValue().getState() != State.FINAL_DELETE){
+ else if(getVertexValue().getState() != State.END_VERTEX){ //FINAL_DELETE
sendEndMsgToNextNode();
}
}
@@ -191,9 +191,9 @@
*/
public void setMessageType(int message){
//kill Message because it has been merged by the head
- if(getVertexValue().getState() == State.END_VERTEX || getVertexValue().getState() == State.FINAL_DELETE){
+ if(getVertexValue().getState() == State.END_VERTEX){ //FINAL_DELETE
msg.setMessage(Message.END);
- getVertexValue().setState(State.FINAL_DELETE);
+ getVertexValue().setState(State.END_VERTEX); //FINAL_DELETE
setVertexValue(getVertexValue());
}
else
@@ -294,7 +294,7 @@
else
voteToHalt();
}
- if(getVertexValue().getState() == State.END_VERTEX || getVertexValue().getState() == State.FINAL_DELETE){
+ if(getVertexValue().getState() == State.END_VERTEX){ //FINAL_DELETE
voteToHalt();
}
if(getVertexValue().getState() == State.FINAL_VERTEX){
@@ -313,7 +313,7 @@
}
else{
if(getVertexValue().getState() != State.START_VERTEX
- && getVertexValue().getState() != State.END_VERTEX && getVertexValue().getState() != State.FINAL_DELETE){
+ && getVertexValue().getState() != State.END_VERTEX){ //FINAL_DELETE
deleteVertex(getVertexId());//killSelf because it doesn't receive any message
}
}
diff --git a/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/JobGen/JobGenerator.java b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/JobGen/JobGenerator.java
index 78cc005..68e29ee 100644
--- a/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/JobGen/JobGenerator.java
+++ b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/JobGen/JobGenerator.java
@@ -27,7 +27,7 @@
job.setDynamicVertexValueSize(true);
job.setOutputKeyClass(KmerBytesWritable.class);
job.setOutputValueClass(ValueStateWritable.class);
- job.getConfiguration().setInt(NaiveAlgorithmForPathMergeVertex.KMER_SIZE, 7);
+ job.getConfiguration().setInt(NaiveAlgorithmForPathMergeVertex.KMER_SIZE, 5);
job.getConfiguration().writeXml(new FileOutputStream(new File(outputPath)));
}
@@ -43,7 +43,7 @@
job.setDynamicVertexValueSize(true);
job.setOutputKeyClass(KmerBytesWritable.class);
job.setOutputValueClass(ValueStateWritable.class);
- job.getConfiguration().setInt(TwoStepLogAlgorithmForPathMergeVertex.KMER_SIZE, 7);
+ job.getConfiguration().setInt(TwoStepLogAlgorithmForPathMergeVertex.KMER_SIZE, 5);
job.getConfiguration().writeXml(new FileOutputStream(new File(outputPath)));
}
diff --git a/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/pathmerge/GraphBuildTestCase.java b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/pathmerge/GraphBuildTestCase.java
new file mode 100644
index 0000000..a625a79
--- /dev/null
+++ b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/pathmerge/GraphBuildTestCase.java
@@ -0,0 +1,122 @@
+package edu.uci.ics.genomix.pregelix.pathmerge;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.FileUtil;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.io.SequenceFile;
+import org.apache.hadoop.mapred.JobConf;
+import org.apache.hadoop.util.ReflectionUtils;
+import org.junit.Test;
+
+import edu.uci.ics.genomix.driver.Driver;
+import edu.uci.ics.genomix.driver.Driver.Plan;
+import edu.uci.ics.genomix.job.GenomixJob;
+import edu.uci.ics.genomix.type.KmerBytesWritable;
+import edu.uci.ics.genomix.type.KmerCountValue;
+
+public class GraphBuildTestCase extends TestCase {
+ private final JobConf conf;
+ private Driver driver;
+ private int numberOfNC = 2;
+ private int numPartitionPerMachine = 1;
+
+ private static final String ACTUAL_RESULT_DIR = "graphbuildresult";
+ private static final String HDFS_OUTPUT_PATH = "/result";
+ private static final String DUMPED_RESULT = ACTUAL_RESULT_DIR
+ + HDFS_OUTPUT_PATH + "/result.txt";
+ private static final String CONVERT_RESULT = ACTUAL_RESULT_DIR
+ + HDFS_OUTPUT_PATH + "/result.txt.txt";
+
+ public GraphBuildTestCase(JobConf conf, Driver driver){
+ this.conf = conf;
+ this.driver = driver;
+ }
+
+ private void cleanUpReEntry() throws IOException {
+ FileSystem lfs = FileSystem.getLocal(new Configuration());
+ if (lfs.exists(new Path(DUMPED_RESULT))) {
+ lfs.delete(new Path(DUMPED_RESULT), true);
+ }
+ FileSystem dfs = FileSystem.get(conf);
+ if (dfs.exists(new Path(HDFS_OUTPUT_PATH))) {
+ dfs.delete(new Path(HDFS_OUTPUT_PATH), true);
+ }
+ }
+
+ @Test
+ public void Test() throws Exception {
+ cleanUpReEntry();
+ TestPreClusterGroupby();
+ }
+
+ public void TestPreClusterGroupby() throws Exception {
+ conf.set(GenomixJob.GROUPBY_TYPE, "precluster");
+ //conf.set(GenomixJob.OUTPUT_FORMAT, "text");
+ System.err.println("Testing PreClusterGroupBy");
+ driver.runJob(new GenomixJob(conf), Plan.BUILD_DEBRUJIN_GRAPH, true);
+ Assert.assertEquals(true, checkResults());
+ }
+
+
+ private boolean checkResults() throws Exception {
+ File dumped = null;
+ String format = conf.get(GenomixJob.OUTPUT_FORMAT);
+ if ("text".equalsIgnoreCase(format)) {
+ FileUtil.copyMerge(FileSystem.get(conf),
+ new Path(HDFS_OUTPUT_PATH), FileSystem
+ .getLocal(new Configuration()), new Path(
+ DUMPED_RESULT), false, conf, null);
+ dumped = new File(DUMPED_RESULT);
+ } else {
+
+ FileSystem.getLocal(new Configuration()).mkdirs(
+ new Path(ACTUAL_RESULT_DIR + HDFS_OUTPUT_PATH));
+ File filePathTo = new File(CONVERT_RESULT);
+ BufferedWriter bw = new BufferedWriter(new FileWriter(filePathTo));
+ for (int i = 0; i < numPartitionPerMachine * numberOfNC; i++) {
+ String partname = "/part-" + i;
+ FileUtil.copy(FileSystem.get(conf), new Path(HDFS_OUTPUT_PATH
+ + partname), FileSystem.getLocal(new Configuration()),
+ new Path(ACTUAL_RESULT_DIR + HDFS_OUTPUT_PATH
+ + partname), false, conf);
+
+ Path path = new Path(HDFS_OUTPUT_PATH + partname);
+ FileSystem dfs = FileSystem.get(conf);
+ if (dfs.getFileStatus(path).getLen() == 0) {
+ continue;
+ }
+ SequenceFile.Reader reader = new SequenceFile.Reader(dfs, path,
+ conf);
+ KmerBytesWritable key = new KmerBytesWritable(conf.getInt(
+ GenomixJob.KMER_LENGTH, GenomixJob.DEFAULT_KMER));
+ KmerCountValue value = (KmerCountValue) ReflectionUtils
+ .newInstance(reader.getValueClass(), conf);
+
+ while (reader.next(key, value)) {
+ if (key == null || value == null) {
+ break;
+ }
+ bw.write(key.toString() + "\t" + value.toString());
+ System.out
+ .println(key.toString() + "\t" + value.toString());
+ bw.newLine();
+ }
+ reader.close();
+ }
+ bw.close();
+ dumped = new File(CONVERT_RESULT);
+ }
+
+ // TestUtils.compareWithSortedResult(new File(expectedPath), dumped);
+ return true;
+ }
+}
diff --git a/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/pathmerge/GraphBuildTestSuite.java b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/pathmerge/GraphBuildTestSuite.java
new file mode 100644
index 0000000..d361c40
--- /dev/null
+++ b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/pathmerge/GraphBuildTestSuite.java
@@ -0,0 +1,131 @@
+package edu.uci.ics.genomix.pregelix.pathmerge;
+
+import java.io.BufferedWriter;
+import java.io.DataOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.FileUtil;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.hadoop.io.SequenceFile;
+import org.apache.hadoop.mapred.FileInputFormat;
+import org.apache.hadoop.mapred.FileOutputFormat;
+import org.apache.hadoop.mapred.JobConf;
+import org.apache.hadoop.util.ReflectionUtils;
+
+import edu.uci.ics.genomix.driver.Driver;
+import edu.uci.ics.genomix.driver.Driver.Plan;
+import edu.uci.ics.genomix.job.GenomixJob;
+import edu.uci.ics.genomix.type.KmerBytesWritable;
+import edu.uci.ics.genomix.type.KmerCountValue;
+import junit.framework.Assert;
+import junit.framework.Test;
+import junit.framework.TestResult;
+import junit.framework.TestSuite;
+
+public class GraphBuildTestSuite extends TestSuite {
+ private static final String ACTUAL_RESULT_DIR = "graphbuildresult";
+ private static final String PATH_TO_HADOOP_CONF = "src/test/resources/hadoop/conf";
+
+ private static final String DATA_PATH = "graph/7/TreePath";
+ private static final String HDFS_INPUT_PATH = "/test";
+ private static final String HDFS_OUTPUT_PATH = "/result";
+
+ private static final String HADOOP_CONF_PATH = ACTUAL_RESULT_DIR
+ + File.separator + "conf.xml";
+ private MiniDFSCluster dfsCluster;
+
+ private static JobConf conf = new JobConf();
+ private int numberOfNC = 2;
+ private int numPartitionPerMachine = 1;
+
+ private static Driver driver;
+
+ public void setUp() throws Exception {
+ cleanupStores();
+ edu.uci.ics.hyracks.hdfs.utils.HyracksUtils.init();
+ FileUtils.forceMkdir(new File(ACTUAL_RESULT_DIR));
+ FileUtils.cleanDirectory(new File(ACTUAL_RESULT_DIR));
+ startHDFS();
+
+ FileInputFormat.setInputPaths(conf, HDFS_INPUT_PATH);
+ FileOutputFormat.setOutputPath(conf, new Path(HDFS_OUTPUT_PATH));
+
+ conf.setInt(GenomixJob.KMER_LENGTH, 7);
+ driver = new Driver(
+ edu.uci.ics.hyracks.hdfs.utils.HyracksUtils.CC_HOST,
+ edu.uci.ics.hyracks.hdfs.utils.HyracksUtils.TEST_HYRACKS_CC_CLIENT_PORT,
+ numPartitionPerMachine);
+ }
+
+ private void cleanupStores() throws IOException {
+ FileUtils.forceMkdir(new File("teststore"));
+ FileUtils.forceMkdir(new File("build"));
+ FileUtils.cleanDirectory(new File("teststore"));
+ FileUtils.cleanDirectory(new File("build"));
+ }
+
+ private void startHDFS() throws IOException {
+ conf.addResource(new Path(PATH_TO_HADOOP_CONF + "/core-site.xml"));
+ conf.addResource(new Path(PATH_TO_HADOOP_CONF + "/mapred-site.xml"));
+ conf.addResource(new Path(PATH_TO_HADOOP_CONF + "/hdfs-site.xml"));
+
+ FileSystem lfs = FileSystem.getLocal(new Configuration());
+ lfs.delete(new Path("build"), true);
+ System.setProperty("hadoop.log.dir", "logs");
+ dfsCluster = new MiniDFSCluster(conf, numberOfNC, true, null);
+ FileSystem dfs = FileSystem.get(conf);
+ Path src = new Path(DATA_PATH);
+ Path dest = new Path(HDFS_INPUT_PATH);
+ dfs.mkdirs(dest);
+ dfs.copyFromLocalFile(src, dest);
+
+ DataOutputStream confOutput = new DataOutputStream(
+ new FileOutputStream(new File(HADOOP_CONF_PATH)));
+ conf.writeXml(confOutput);
+ confOutput.flush();
+ confOutput.close();
+ }
+
+ public static Test suite() throws Exception {
+ GraphBuildTestSuite testSuite = new GraphBuildTestSuite();
+ testSuite.setUp();
+ testSuite.addTest(new GraphBuildTestCase(conf, driver));
+ return testSuite;
+ }
+
+ /**
+ * Runs the tests and collects their result in a TestResult.
+ */
+ @Override
+ public void run(TestResult result) {
+ try {
+ int testCount = countTestCases();
+ for (int i = 0; i < testCount; i++) {
+ // cleanupStores();
+ Test each = this.testAt(i);
+ if (result.shouldStop())
+ break;
+ runTest(each, result);
+ }
+ tearDown();
+ } catch (Exception e) {
+ throw new IllegalStateException(e);
+ }
+ }
+
+ public void tearDown() throws Exception {
+ edu.uci.ics.hyracks.hdfs.utils.HyracksUtils.deinit();
+ cleanupHDFS();
+ }
+
+ private void cleanupHDFS() throws Exception {
+ dfsCluster.shutdown();
+ }
+}
diff --git a/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/pathmerge/MergePathTest.java b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/pathmerge/MergePathTest.java
index 5e99cc9..d813709 100644
--- a/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/pathmerge/MergePathTest.java
+++ b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/pathmerge/MergePathTest.java
@@ -20,9 +20,9 @@
public class MergePathTest {
public static final String PATH_TO_TESTSTORE = "testcase/pathmerge/";
//"genomix_result/pathmerge/new_naive";
- public static final String NAIVE_DATA_INPUT = "genomix_result/pathmerge/new_naive";//"actual/NaiveAlgorithmForMergeGraph/BinaryOutput/test";
+ public static final String NAIVE_DATA_INPUT = "genomix_result/pathmerge/naive_newest";//"actual/NaiveAlgorithmForMergeGraph/BinaryOutput/test";
//"genomix_result/pathmerge/new_log";
- public static final String LOG_DATA_INPUT = "genomix_result/pathmerge/new_log";//"actual/TwoStepLogAlgorithmForMergeGraph/BinaryOutput/test";
+ public static final String LOG_DATA_INPUT = "genomix_result/pathmerge/log_newest";//"actual/TwoStepLogAlgorithmForMergeGraph/BinaryOutput/test";
public static final String TEXT_OUTPUT = PATH_TO_TESTSTORE + "textfile";
public static final String CHAIN_OUTPUT = PATH_TO_TESTSTORE + "chain";
diff --git a/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/pathmerge/PathMergeSmallTestCase.java b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/pathmerge/PathMergeSmallTestCase.java
index 52fd4c7..67b6f21 100644
--- a/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/pathmerge/PathMergeSmallTestCase.java
+++ b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/pathmerge/PathMergeSmallTestCase.java
@@ -77,7 +77,7 @@
private void compareResults() throws Exception {
dfs.copyToLocalFile(FileOutputFormat.getOutputPath(job), new Path(
resultFileDir));
- GenerateTextFile.generateFromPathmergeResult(7, resultFileDir, textFileDir);
+ GenerateTextFile.generateFromPathmergeResult(5, resultFileDir, textFileDir);
// TestUtils.compareWithResultDir(new File(expectedFileDir), new
// File(resultFileDir));
}
diff --git a/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/pathmerge/PathMergeSmallTestSuite.java b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/pathmerge/PathMergeSmallTestSuite.java
index 901706e..c1ddfef 100644
--- a/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/pathmerge/PathMergeSmallTestSuite.java
+++ b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/pathmerge/PathMergeSmallTestSuite.java
@@ -44,14 +44,14 @@
private static final Logger LOGGER = Logger
.getLogger(PathMergeSmallTestSuite.class.getName());
- public static final String PreFix = "data/7";
+ public static final String PreFix = "data/PathTestSet";
public static final String[] TestDir = { PreFix + File.separator
- + "BridgePath", PreFix + File.separator
+ /*+ "BridgePath", PreFix + File.separator
+ "CyclePath", PreFix + File.separator
+ "SimplePath", PreFix + File.separator
+ "SinglePath", PreFix + File.separator
- + "TreePath"};
- /*+ "2", PreFix + File.separator
+ + "TreePath"};*/
+ + "2", PreFix + File.separator
+ "3", PreFix + File.separator
+ "4", PreFix + File.separator
+ "5", PreFix + File.separator
@@ -59,7 +59,7 @@
+ "7", PreFix + File.separator
+ "8", PreFix + File.separator
+ "9", PreFix + File.separator
- + "10"}; , PreFix + File.separator
+ + "10", PreFix + File.separator
+ "TwoKmer", PreFix + File.separator
+ "ThreeKmer", PreFix + File.separator
+ "SinglePath", PreFix + File.separator
@@ -69,7 +69,7 @@
+ "CyclePath", PreFix + File.separator
+ "RingPath", PreFix + File.separator
+ "LongPath", PreFix + File.separator
- + "TreePath"};*/
+ + "TreePath"};
private static final String ACTUAL_RESULT_DIR = "actual";
private static final String PATH_TO_HADOOP_CONF = "src/test/resources/hadoop/conf";
private static final String PATH_TO_CLUSTER_STORE = "src/test/resources/cluster/stores.properties";
@@ -97,13 +97,6 @@
startHDFS();
}
- private void cleanupStores() throws IOException {
- FileUtils.forceMkdir(new File("teststore"));
- FileUtils.forceMkdir(new File("build"));
- FileUtils.cleanDirectory(new File("teststore"));
- FileUtils.cleanDirectory(new File("build"));
- }
-
private void startHDFS() throws IOException {
conf.addResource(new Path(PATH_TO_HADOOP_CONF + "/core-site.xml"));
conf.addResource(new Path(PATH_TO_HADOOP_CONF + "/mapred-site.xml"));
@@ -130,6 +123,13 @@
confOutput.flush();
confOutput.close();
}
+
+ private void cleanupStores() throws IOException {
+ FileUtils.forceMkdir(new File("teststore"));
+ FileUtils.forceMkdir(new File("build"));
+ FileUtils.cleanDirectory(new File("teststore"));
+ FileUtils.cleanDirectory(new File("build"));
+ }
/**
* cleanup hdfs cluster