Search code examples
hadoopmapreduce

Will `hadoop jar` be executed on NameNode or DataNode?


I have a question when I submit hadoop jar command to run simple jar without any MR code , does hadoop jar command runs the jar on edge node (name node or master node) or picks data node as executor similar to Oozie? or do I need to use hadoop-streaming jar to run java jar application?

hadoop jar /home/bin/myjar-1.0-SNAPSHOT-jar-with-dependencies.jar com.test.ImpalaJdbcConnectionTest 

Solution

  • If your Java program doesn't instantiate YarnClient, and that YarnClient doesn't create an Application in YARN, then it is run as if you simply called java -jar <your-jar-file>, i.e. locally on the node where you execute it.