Skip to content
This repository has been archived by the owner on May 6, 2018. It is now read-only.

Commit

Permalink
Fixed local integration issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmy0017 committed Jun 9, 2015
1 parent 24b01e6 commit 175d395
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 23 deletions.
15 changes: 0 additions & 15 deletions src/test/java/edu/umd/cloud9/integration/IntegrationUtils.java
Expand Up @@ -24,21 +24,6 @@
import com.google.common.collect.Maps;

public class IntegrationUtils {
public static final String LOCAL_ARGS =
"-D fs.defaultFS=file:/// " +
"-D mapreduce.framework.name=local " +
"-D mapreduce.jobtracker.address=local " +
"-D mapreduce.cluster.local.dir=/tmp/mapred/local " +
"-D mapreduce.cluster.temp.dir=/tmp/mapred/temp " +
"-D mapreduce.jobtracker.staging.root.dir=/tmp/mapred/staging " +
"-D mapreduce.jobtracker.system.dir=/tmp/mapred/system";

public static final String D_JT = "-Dmapred.job.tracker=bespin00.umiacs.umd.edu:8021";
public static final String D_NN = "-Dfs.defaultFS=hdfs://bespinrm.umiacs.umd.edu:8020";

public static final String D_JT_LOCAL = "-D mapred.job.tracker=local";
public static final String D_NN_LOCAL = "-D fs.default.name=file:///";

public static String getJar(String path, final String prefix) {
File[] arr = new File(path).listFiles(new FilenameFilter() {
@Override
Expand Down
Expand Up @@ -39,9 +39,9 @@ public void testBigramRelativeFrequencyBase() throws Exception {

assertTrue(fs.exists(collectionPath));

String[] args = new String[] { "hadoop jar", IntegrationUtils.getJar("target", "cloud9"),
String[] args = new String[] { "hadoop --config src/test/resources/hadoop-local-conf/ jar",
IntegrationUtils.getJar("target", "cloud9"),
edu.umd.cloud9.example.bigram.BigramRelativeFrequency.class.getCanonicalName(),
IntegrationUtils.LOCAL_ARGS,
"-input", collectionPath.toString(),
"-output", tmpPrefix + "-base",
"-numReducers", "1"};
Expand Down Expand Up @@ -82,9 +82,9 @@ public void testBigramRelativeFrequencyJson() throws Exception {

assertTrue(fs.exists(collectionPath));

String[] args = new String[] { "hadoop jar", IntegrationUtils.getJar("target", "cloud9"),
String[] args = new String[] { "hadoop --config src/test/resources/hadoop-local-conf/ jar",
IntegrationUtils.getJar("target", "cloud9"),
edu.umd.cloud9.example.bigram.BigramRelativeFrequencyJson.class.getCanonicalName(),
IntegrationUtils.LOCAL_ARGS,
"-input", collectionPath.toString(),
"-output", tmpPrefix + "-json",
"-numReducers", "1"};
Expand Down Expand Up @@ -125,9 +125,9 @@ public void testBigramRelativeFrequencyTuple() throws Exception {

assertTrue(fs.exists(collectionPath));

String[] args = new String[] { "hadoop jar", IntegrationUtils.getJar("target", "cloud9"),
String[] args = new String[] { "hadoop --config src/test/resources/hadoop-local-conf/ jar",
IntegrationUtils.getJar("target", "cloud9"),
edu.umd.cloud9.example.bigram.BigramRelativeFrequencyTuple.class.getCanonicalName(),
IntegrationUtils.LOCAL_ARGS,
"-input", collectionPath.toString(),
"-output", tmpPrefix + "-tuple",
"-numReducers", "1"};
Expand Down
Expand Up @@ -37,9 +37,9 @@ public void testInvertedIndexing() throws Exception {

assertTrue(fs.exists(collectionPath));

String[] args = new String[] { "hadoop jar", IntegrationUtils.getJar("target", "cloud9"),
String[] args = new String[] { "hadoop --config src/test/resources/hadoop-local-conf/ jar",
IntegrationUtils.getJar("target", "cloud9"),
edu.umd.cloud9.example.ir.BuildInvertedIndex.class.getCanonicalName(),
IntegrationUtils.LOCAL_ARGS,
"-input", collectionPath.toString(),
"-output", tmpPrefix,
"-numReducers", "1"};
Expand Down

0 comments on commit 175d395

Please sign in to comment.