Getting the Tool Interface warning even though it is implemented Getting the Tool Interface warning even though it is implemented hadoop hadoop

Getting the Tool Interface warning even though it is implemented


As your question pops really fast on the top of Google search for this warning, I'll give a proper answer here :

As user1797538 you said : (sorry about that)

user1797538: "The problem was the call to get a Job instance"

The superclass Configured must be used. As its name suggests, it is already configured, so the existing Configuration must be used by the Tester class and not set a new empty one.

If we extract the Job creation in a method :

private Job createJob() throws IOException {    // On this line use getConf() instead of new Configuration()    Job job = Job.getInstance(getConf(), Tester.class.getCanonicalName());    // Other job setter call here, for example    job.setJarByClass(Tester.class);    job.setMapperClass(TesterMapper.class);    job.setCombinerClass(TesterReducer.class);    job.setReducerClass(TesterReducer.class);    job.setOutputKeyClass(Text.class);    job.setOutputValueClass(IntWritable.class);    // adapt this to your needs of course.    return job;}

Another example from the javadoc : org.apache.hadoop.util.Tool

And the Javadoc : Configured.getConf()