|
@@ -61,6 +61,7 @@ public class Grep extends Configured implements Tool {
|
|
try {
|
|
try {
|
|
|
|
|
|
grepJob.setJobName("grep-search");
|
|
grepJob.setJobName("grep-search");
|
|
|
|
+ grepJob.setJarByClass(Grep.class);
|
|
|
|
|
|
FileInputFormat.setInputPaths(grepJob, args[0]);
|
|
FileInputFormat.setInputPaths(grepJob, args[0]);
|
|
|
|
|
|
@@ -78,6 +79,7 @@ public class Grep extends Configured implements Tool {
|
|
|
|
|
|
Job sortJob = new Job(conf);
|
|
Job sortJob = new Job(conf);
|
|
sortJob.setJobName("grep-sort");
|
|
sortJob.setJobName("grep-sort");
|
|
|
|
+ sortJob.setJarByClass(Grep.class);
|
|
|
|
|
|
FileInputFormat.setInputPaths(sortJob, tempDir);
|
|
FileInputFormat.setInputPaths(sortJob, tempDir);
|
|
sortJob.setInputFormatClass(SequenceFileInputFormat.class);
|
|
sortJob.setInputFormatClass(SequenceFileInputFormat.class);
|