Why is jar file required to execute a MR code instead of class file?

0 votes

While executing MapReduce code I am wondering why we need a jar file and cannot use a class file to execute MR code in Hadoop? An also whywe donot use java keyword while executing a Java code in Hadoop?

Apr 24, 2018 in Big Data Hadoop by nitinrawat895
• 10,800 points
69 views

1 answer to this question.

0 votes
We use hadoop keyword to invoke the hadoop script.

The benefits of using jar here are: The jar required to run the code which are present in Hadoop lib directory are bundled together in the jar file. The configuration files which are required for the MR code execution are also bundled here in the jar file.

So, while using jar all of this things are bundled together and are execution ready. But using class if you are executing the jar you have to add all the required jars & configuration files separately.
answered Apr 24, 2018 by Shubham
• 13,350 points

Related Questions In Big Data Hadoop

0 votes
1 answer

What is the command to count number of lines in a file in hdfs?

hadoop fs -cat /example2/doc1 | wc -l READ MORE

answered Nov 22, 2018 in Big Data Hadoop by Omkar
• 68,480 points
458 views
0 votes
1 answer

How to find the number of blocks a hdfs file is divided into?

Yes. you can use the hadoop fsck command to do ...READ MORE

answered Nov 29, 2018 in Big Data Hadoop by Omkar
• 68,480 points
736 views
0 votes
7 answers

How to run a jar file in hadoop?

I used this command to run my ...READ MORE

answered Dec 10, 2018 in Big Data Hadoop by Dasinto
6,625 views
0 votes
1 answer

Why Java Code in Hadoop uses own Data Types instead of basic Data types?

Hadoop provides us Writable interface based data ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by kurt_cobain
• 9,280 points
110 views
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,800 points
3,585 views
+1 vote
11 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
18,476 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,280 points
1,335 views
0 votes
1 answer
0 votes
1 answer

How to print the content of a file in console present in HDFS?

Yes, you can use hdfs dfs command ...READ MORE

answered Apr 19, 2018 in Big Data Hadoop by Shubham
• 13,350 points
738 views
0 votes
2 answers

hadoop copy a local file system folder to HDFS

There's a typo in your command: "hadopp". ...READ MORE

answered Feb 4 in Big Data Hadoop by Lohith
4,304 views