I am learning hadoop and I got through this line
import org.apache.hadoop.mapreduce.Job;
Job job = new Job();
I keep getting warning (deprecated class), I'm aware that using it will work fine. but I don't want to use deprecated classes. so what is the best way to do this? a link or a reference would be highly appreciated.
note: I'm using hadoop 2.2.0
In 1.x using Job job= new Job(), i.e using any form of Job's constructor is valid. In 2.x Using any form of Job's constructor is deprecated.
This might be because of separating the resource allocation and job administration in 2.x architecture. in 1.x both these tasks are handled by the Job Tracker.
Below are links to API documentation for Job class. https://hadoop.apache.org/docs/r1.2.1/api/org/apache/hadoop/mapreduce/Job.html https://hadoop.apache.org/docs/r2.4.1/api/org/apache/hadoop/mapreduce/Job.html
Hadoop's new API is still under forming and shaping.
You can use Job.getInstance(Configuration conf) factory method. Have a look at the other variations of this factory method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With