mapreduce - Error when running Hadoop Map Reduce for map-only job -


i want run map-only job in hadoop mapreduce, here's code:

    configuration conf = new configuration();     job job = new job(conf);     job.setjobname("import");      job.setmapperclass(map.class);//custom mapper     job.setinputformatclass(textinputformat.class);     job.setnumreducetasks(0);      textinputformat.setinputpaths(job, new path("/home/jonathan/input")); 

but error:

13/07/17 18:22:48 error security.usergroupinformation: priviledgedactionexception as: jonathan cause:org.apache.hadoop.mapred.invalidjobconfexception:  output directory not set.  exception in thread "main" org.apache.hadoop.mapred.invalidjobconfexception:   output directory not set. 

then tried use this:

job.setoutputformatclass(org.apache.hadoop.mapred.lib.nulloutputformat.class); 

but gives me compilation error:

java: method setoutputformatclass in class org.apache.hadoop.mapreduce.job    cannot applied given types;   required: java.lang.class<? extends org.apache.hadoop.mapreduce.outputformat>   found: java.lang.class<org.apache.hadoop.mapred.lib.nulloutputformat>   reason: actual argument java.lang.class   <org.apache.hadoop.mapred.lib.nulloutputformat> cannot converted    java.lang.class<? extends org.apache.hadoop.mapreduce.outputformat>    method invocation conversion 

what doing wrong?

map-only jobs still need output location specified. error says, you're not specifying this.

i think mean job produces no output @ all. hadoop still wants specify output location, though nothing need written.

you want org.apache.hadoop.mapreduce.lib.output.nulloutputformat not org.apache.hadoop.mapred.lib.nulloutputformat, second error indicates though it's subtle.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -