Map Reduce Programs

Viewing 1 reply thread
  • Author
    Posts
    • #4905
      DataFlair TeamDataFlair Team
      Spectator

      How can we compile and execute map reduce programs without using eclipse?

    • #4907
      DataFlair TeamDataFlair Team
      Spectator

      1) Write your MapReduce Program in a Text editor of your choice.

      2) Place the source code (.java) file in any folder.

      3) Compile the source using the following command:
      javac -cp <path to hadoop client libraries> -d classes *.java

      4) Create a jar file:
      jar cvf sample.jar classes

      5) Execute the jar file
      hadoop jar sample.jar <fully qualified main class> <arg1> <arg2> ...

      Alternatively, if you have Maven installed, then you can do the same by creating a Maven Project Structure from the Command Line, create a pom.xml and executemvn packagewithout worrying about external client libraries that Apache provides for Hadoop.

      Follow the link for more details:https:
      //maven.apache.org/guides/getting-started/maven-in-five-minutes.html

Viewing 1 reply thread
  • You must be logged in to reply to this topic.