Submitting MapReduce job using jobConf object vs job object

0 votes

I am new to Hadoop & I am a bit confused about how to submit a job to Hadoop. Earlier I was submitting the job using the following command:

JobClient.runJob(jobconf);

But while going through an online tutorial, I found out that they are submitting the job using the below command:

Configuration conf = getConf();
Job job = new Job(conf, "secondary sort");

Can anyone explain me what is the difference between jobconf & job object? Which is the right way of submitting the job?

May 4, 2018 in Big Data Hadoop by nitinrawat895
• 10,670 points
269 views

1 answer to this question.

0 votes

Both JobConf & Job objects are used for configuring & submitting the job. You can also control the execution using the objects. The only difference between them is JobConf object belong to the org.apache.hadoop.mapred package, which is the deprecated API, while Job object is from org.apache.hadoop.mapreduce package, which is the new API.

I would recommend using the new API.

You can refer the following link for the official documentation.

JobConf: https://hadoop.apache.org/docs/r2.7.3/api/org/apache/hadoop/mapred/JobConf.html

Job: https://hadoop.apache.org/docs/r2.7.3/api/org/apache/hadoop/mapreduce/Job.html
 

answered May 4, 2018 by Shubham
• 13,290 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Hadoop MapReduce vs MongoDB MapReduce

Hadoop vs MongoDB MR: 1) Hadoop's MR can ...READ MORE

answered Mar 26, 2018 in Big Data Hadoop by nitinrawat895
• 10,670 points
153 views
0 votes
1 answer

How hadoop mapreduce job is submitted to worker nodes?

Alright, I think you are basically looking ...READ MORE

answered Mar 29, 2018 in Big Data Hadoop by Ashish
• 2,630 points
1,629 views
0 votes
0 answers

Error running hadoop mapreduce in Python using Hadoop Streaming

I was trying a sample mapredyce code ...READ MORE

Apr 2, 2018 in Big Data Hadoop by nitinrawat895
• 10,670 points
104 views
0 votes
1 answer
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,670 points
2,679 views
0 votes
10 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
13,291 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,240 points
976 views
0 votes
1 answer
0 votes
1 answer

How do I parse pdf file using MapReduce?

If you have your own custom InputFormat(WholeFileInputFormat). ...READ MORE

answered Apr 11, 2018 in Big Data Hadoop by Shubham
• 13,290 points
182 views
0 votes
1 answer

Getting error in MapReduce job.setInputFormatClass

In old Hadoop API(i.e. below Hadoop 0.20.0), ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by Shubham
• 13,290 points
317 views