change to Jobconf
git-svn-id: https://hyracks.googlecode.com/svn/branches/fullstack_genomix@2962 123451ca-8445-de46-9d55-352943316053
diff --git a/genomix/genomix-core/src/main/java/edu/uci/ics/genomix/driver/Driver.java b/genomix/genomix-core/src/main/java/edu/uci/ics/genomix/driver/Driver.java
index 12c72d8..ced0c6a 100644
--- a/genomix/genomix-core/src/main/java/edu/uci/ics/genomix/driver/Driver.java
+++ b/genomix/genomix-core/src/main/java/edu/uci/ics/genomix/driver/Driver.java
@@ -7,6 +7,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
@@ -127,8 +128,9 @@
}
public static void main(String[] args) throws Exception {
- GenomixJob job = new GenomixJob();
- String[] otherArgs = new GenericOptionsParser(job, args)
+ GenomixJob jobConf = new GenomixJob();
+ Job job = new Job(jobConf);
+ String[] otherArgs = new GenericOptionsParser(jobConf, args)
.getRemainingArgs();
if (otherArgs.length < 4) {
System.err.println("Need <serverIP> <port> <input> <output>");
@@ -136,11 +138,11 @@
}
String ipAddress = otherArgs[0];
int port = Integer.parseInt(otherArgs[1]);
- int numOfDuplicate = job.getInt(CPARTITION_PER_MACHINE, 2);
- boolean bProfiling = job.getBoolean(IS_PROFILING, true);
- FileInputFormat.setInputPaths(new Job(job), otherArgs[2]);
- FileOutputFormat.setOutputPath(new Job(job), new Path(otherArgs[3]));
+ int numOfDuplicate = jobConf.getInt(CPARTITION_PER_MACHINE, 2);
+ boolean bProfiling = jobConf.getBoolean(IS_PROFILING, true);
+ FileInputFormat.setInputPaths(job, otherArgs[2]);
+ FileOutputFormat.setOutputPath(job, new Path(otherArgs[3]));
Driver driver = new Driver(ipAddress, port, numOfDuplicate);
- driver.runJob(job, Plan.BUILD_DEBRUJIN_GRAPH, bProfiling);
+ driver.runJob(jobConf, Plan.BUILD_DEBRUJIN_GRAPH, bProfiling);
}
}
diff --git a/genomix/genomix-core/src/main/java/edu/uci/ics/genomix/job/GenomixJob.java b/genomix/genomix-core/src/main/java/edu/uci/ics/genomix/job/GenomixJob.java
index 55912c6..21808f8 100644
--- a/genomix/genomix-core/src/main/java/edu/uci/ics/genomix/job/GenomixJob.java
+++ b/genomix/genomix-core/src/main/java/edu/uci/ics/genomix/job/GenomixJob.java
@@ -3,8 +3,9 @@
import java.io.IOException;
import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.mapred.JobConf;
-public class GenomixJob extends Configuration {
+public class GenomixJob extends JobConf {
public static final String JOB_NAME = "genomix";