How hadoop command works with javac?

0 votes

I was reading Apache mapreduce tutorial

I was able to run the example and get the desired result. However, I am not able to understand how it is asked that we should run following to compile the Java file.

$ bin/hadoop

I went through the hapdoop command details. It partitioned all hadoop switches under General options, User commands, and Administrator commands. I didn't found where above javac command is given in hadoop command page.

Q. In fact actually I didn't get how above command works. I mean we usually specify hyphen-prefixed options in front of the commands. However, this above command asks to run javac in a way that I never saw before. I usually used to compile java files directly by javac Why here is it asked to not do this way?

Q. Also there is .Main in in the given command. What does this mean?

Aug 17, 2018 in Big Data Hadoop by Frankie
• 9,710 points

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
Javac is used for compiling your java code. If you notice the WordCount example, there are a lot of import statements which require you to add the corresponding jars in the classpath.

when you run hadoop, hadoop would have already loaded all these dependent jar for compiling your program. You can test it by running javac and compiler would throw cannot find symbol error if you don't already have these required jar in your classpath.

With the Hadoop, you can set the compiler that you want it to use for compiling your code. is the programmatic interface for the Java Programming Language

When you execute bin/hadoop , with the first parameter as and second parameter as, it uses the to compile
answered Aug 17, 2018 by Neha
• 6,180 points

Related Questions In Big Data Hadoop

0 votes
1 answer

What is -cp command in hadoop? How it works?

/user/cloudera/data1 is not a directory, it is ...READ MORE

answered Oct 17, 2018 in Big Data Hadoop by Frankie
• 9,710 points
0 votes
1 answer

Hadoop: How to use Jps command with Sun JDK installed?

You can put JPS into your path ...READ MORE

answered Nov 9, 2018 in Big Data Hadoop by Omkar
• 66,990 points
0 votes
1 answer

The file exists before processing with hadoop command

Took session and it got resolved. READ MORE

answered Dec 18, 2017 in Big Data Hadoop by Sudhir
• 1,610 points
0 votes
1 answer

How to get started with Hadoop?

Well, hadoop is actually a framework that ...READ MORE

answered Mar 21, 2018 in Big Data Hadoop by coldcode
• 2,010 points
0 votes
1 answer

Moving files in Hadoop using the Java API?

I would recommend you to use FileSystem.rename(). ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by Shubham
• 12,890 points
0 votes
1 answer

Hadoop giving, in mkdir Java code.

I am not sure about the issue. ...READ MORE

answered May 3, 2018 in Big Data Hadoop by Shubham
• 12,890 points
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
• 9,610 points
0 votes
10 answers

hadoop fs -put command?

copy command can be used to copy files ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Sujay
+2 votes
1 answer

How to calculate Maximum salary of the employee with the name using the Map Reduce Technique

Please try the below code and it ...READ MORE

answered Jul 25, 2018 in Big Data Hadoop by Neha
• 6,180 points
0 votes
1 answer

How to create a project for the first time in Hadoop.?

If you want to learn Hadoop framework ...READ MORE

answered Jul 26, 2018 in Big Data Hadoop by Neha
• 6,180 points

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.