You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by Steve Cohen <ma...@gmail.com> on 2010/09/29 17:19:44 UTC
GenericOptionsParser
I've been seeing the following error in the hadoop log when I kick off the
nutch crawl script.
2010-09-29 10:47:07,837 WARN mapred.JobClient - Use GenericOptionsParser
for parsing the arguments. Applications should implement Tool for the same.
Now, I've looked up the error and see several questions about this message.
I see this one,
http://old.nabble.com/GenericOptionsParser-warning-td22075434.html, That
mentions:
"You *should* put this stub code in your program as *the* means to start
your
MapReduce job:
public class Foo extends Configured *implements* *Tool* {
public int run(String [] args) throws IOException {
JobConf conf = new JobConf(getConf(), Foo.class);
// run *the* job here.
return 0;
}
public static void main(String [] args) throws Exception {
int ret = *ToolRunner*.run(new Foo(), args); // calls your run() method.
System.exit(ret);
}
} "
My question is how do implement the above in nutch?
Thanks,
Steve Cohen