Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what are the replacement for hadoop Job deprecated class

Tags:

java

hadoop

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

like image 362
Moayyad Yaghi Avatar asked Feb 08 '14 11:02

Moayyad Yaghi


2 Answers

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

like image 85
Dorababu G Avatar answered Nov 13 '22 13:11

Dorababu G


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.

like image 25
Chiron Avatar answered Nov 13 '22 13:11

Chiron