-Re: how to specify class name to run in mapreduce job
Bejoy Ks 2012-01-11, 06:58
You can use the format as
hadoop jar <jarName> <className>
Like -> hadoop jar /home/user/sample.jar com.sample.apps.MainClass ......
Don't specify the main class while packing your jar. This would help you
incorporate multiple entry points in same jar for different functionality.
Hope it helps!..
On Wed, Jan 11, 2012 at 4:56 AM, T Vinod Gupta <[EMAIL PROTECTED]>wrote:
> how can i specify which class' main method to run as a job when i do
> mapreduce? lets say my jar has 4 classes and each one of them has a main
> method. i want to pass the class name in the 'hadoop jar <jar file>
> <classname>' command. this will be similar to running stock tools inside
> hbase or other hadoop jars that out of the box.
> currently, i solve this problem by setting the main in the project and
> building the jar and running it. but i want to be able to flip that at run
> time instead of compile time.