You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by Nishanth S <ch...@gmail.com> on 2015/07/01 00:21:15 UTC

Packaging multiple map reduce jobs into one Jar

Hello,

Is there a  way I can package multiple map reduce jobs  into one jar file
and  then invoke them using hadoop jar.I am using maven as the build
tool.What should be the main class in the manifest file in this case?.

Thanks,
Nishan

Re: Packaging multiple map reduce jobs into one Jar

Posted by Ashutosh Kumar <as...@gmail.com>.
You can use jobcontrol if the jobs have dependency .

On Wed, Jul 1, 2015 at 3:51 AM, Nishanth S <ch...@gmail.com> wrote:

> Hello,
>
> Is there a  way I can package multiple map reduce jobs  into one jar file
> and  then invoke them using hadoop jar.I am using maven as the build
> tool.What should be the main class in the manifest file in this case?.
>
> Thanks,
> Nishan
>

Re: Packaging multiple map reduce jobs into one Jar

Posted by Ashutosh Kumar <as...@gmail.com>.
You can use jobcontrol if the jobs have dependency .

On Wed, Jul 1, 2015 at 3:51 AM, Nishanth S <ch...@gmail.com> wrote:

> Hello,
>
> Is there a  way I can package multiple map reduce jobs  into one jar file
> and  then invoke them using hadoop jar.I am using maven as the build
> tool.What should be the main class in the manifest file in this case?.
>
> Thanks,
> Nishan
>

Re: Packaging multiple map reduce jobs into one Jar

Posted by Nishanth S <ch...@gmail.com>.
I agree to what Gabriel said.i avoided setting main class in manifest and
it did work.Thanks.

On Wed, Jul 1, 2015 at 9:25 AM, gabriel balan <ga...@oracle.com>
wrote:

>  Hi
>
> Adding to Harshit Mathur's reply:
>
> What should be the main class in the manifest file
>
> From what I remember, you must not set that. (i.e. if you set it to
> MyMain1, then you can't use MyMain2)
>
> hth
> Gabriel Balan
>
>
>
> On 7/1/2015 12:02 AM, Harshit Mathur wrote:
>
>    Yes you can do this.
>  You can have multiple main in your jar, so you can run,
>              hadoop jar jarname.jar packagename.classname arguments
>
>             for eg: hadoop jar myJar.jar my.testapp.code1.MyMain1 arg1 arg2
>                       hadoop jar myJar.jar my.testapp.code2.MyMain2 arg1
> arg2
>  BR,
>  Harshit
>
>
>
> On Wed, Jul 1, 2015 at 3:51 AM, Nishanth S <ch...@gmail.com> wrote:
>
>> Hello,
>>
>>  Is there a  way I can package multiple map reduce jobs  into one jar
>> file and  then invoke them using hadoop jar.I am using maven as the build
>> tool.What should be the main class in the manifest file in this case?.
>>
>>  Thanks,
>> Nishan
>>
>
>
>
> --
> Harshit Mathur
>
>
> --
> The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation.
>
>

Re: Packaging multiple map reduce jobs into one Jar

Posted by Nishanth S <ch...@gmail.com>.
I agree to what Gabriel said.i avoided setting main class in manifest and
it did work.Thanks.

On Wed, Jul 1, 2015 at 9:25 AM, gabriel balan <ga...@oracle.com>
wrote:

>  Hi
>
> Adding to Harshit Mathur's reply:
>
> What should be the main class in the manifest file
>
> From what I remember, you must not set that. (i.e. if you set it to
> MyMain1, then you can't use MyMain2)
>
> hth
> Gabriel Balan
>
>
>
> On 7/1/2015 12:02 AM, Harshit Mathur wrote:
>
>    Yes you can do this.
>  You can have multiple main in your jar, so you can run,
>              hadoop jar jarname.jar packagename.classname arguments
>
>             for eg: hadoop jar myJar.jar my.testapp.code1.MyMain1 arg1 arg2
>                       hadoop jar myJar.jar my.testapp.code2.MyMain2 arg1
> arg2
>  BR,
>  Harshit
>
>
>
> On Wed, Jul 1, 2015 at 3:51 AM, Nishanth S <ch...@gmail.com> wrote:
>
>> Hello,
>>
>>  Is there a  way I can package multiple map reduce jobs  into one jar
>> file and  then invoke them using hadoop jar.I am using maven as the build
>> tool.What should be the main class in the manifest file in this case?.
>>
>>  Thanks,
>> Nishan
>>
>
>
>
> --
> Harshit Mathur
>
>
> --
> The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation.
>
>

Re: Packaging multiple map reduce jobs into one Jar

Posted by Nishanth S <ch...@gmail.com>.
I agree to what Gabriel said.i avoided setting main class in manifest and
it did work.Thanks.

On Wed, Jul 1, 2015 at 9:25 AM, gabriel balan <ga...@oracle.com>
wrote:

>  Hi
>
> Adding to Harshit Mathur's reply:
>
> What should be the main class in the manifest file
>
> From what I remember, you must not set that. (i.e. if you set it to
> MyMain1, then you can't use MyMain2)
>
> hth
> Gabriel Balan
>
>
>
> On 7/1/2015 12:02 AM, Harshit Mathur wrote:
>
>    Yes you can do this.
>  You can have multiple main in your jar, so you can run,
>              hadoop jar jarname.jar packagename.classname arguments
>
>             for eg: hadoop jar myJar.jar my.testapp.code1.MyMain1 arg1 arg2
>                       hadoop jar myJar.jar my.testapp.code2.MyMain2 arg1
> arg2
>  BR,
>  Harshit
>
>
>
> On Wed, Jul 1, 2015 at 3:51 AM, Nishanth S <ch...@gmail.com> wrote:
>
>> Hello,
>>
>>  Is there a  way I can package multiple map reduce jobs  into one jar
>> file and  then invoke them using hadoop jar.I am using maven as the build
>> tool.What should be the main class in the manifest file in this case?.
>>
>>  Thanks,
>> Nishan
>>
>
>
>
> --
> Harshit Mathur
>
>
> --
> The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation.
>
>

Re: Packaging multiple map reduce jobs into one Jar

Posted by Nishanth S <ch...@gmail.com>.
I agree to what Gabriel said.i avoided setting main class in manifest and
it did work.Thanks.

On Wed, Jul 1, 2015 at 9:25 AM, gabriel balan <ga...@oracle.com>
wrote:

>  Hi
>
> Adding to Harshit Mathur's reply:
>
> What should be the main class in the manifest file
>
> From what I remember, you must not set that. (i.e. if you set it to
> MyMain1, then you can't use MyMain2)
>
> hth
> Gabriel Balan
>
>
>
> On 7/1/2015 12:02 AM, Harshit Mathur wrote:
>
>    Yes you can do this.
>  You can have multiple main in your jar, so you can run,
>              hadoop jar jarname.jar packagename.classname arguments
>
>             for eg: hadoop jar myJar.jar my.testapp.code1.MyMain1 arg1 arg2
>                       hadoop jar myJar.jar my.testapp.code2.MyMain2 arg1
> arg2
>  BR,
>  Harshit
>
>
>
> On Wed, Jul 1, 2015 at 3:51 AM, Nishanth S <ch...@gmail.com> wrote:
>
>> Hello,
>>
>>  Is there a  way I can package multiple map reduce jobs  into one jar
>> file and  then invoke them using hadoop jar.I am using maven as the build
>> tool.What should be the main class in the manifest file in this case?.
>>
>>  Thanks,
>> Nishan
>>
>
>
>
> --
> Harshit Mathur
>
>
> --
> The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation.
>
>

Re: Packaging multiple map reduce jobs into one Jar

Posted by gabriel balan <ga...@oracle.com>.
Hi

Adding to Harshit Mathur's reply:

> What should be the main class in the manifest file
 From what I remember, you must not set that. (i.e. if you set it to MyMain1, then you can't use MyMain2)

hth
Gabriel Balan


On 7/1/2015 12:02 AM, Harshit Mathur wrote:
> Yes you can do this.
> You can have multiple main in your jar, so you can run,
>             hadoop jar jarname.jar packagename.classname arguments
>
>             for eg: hadoop jar myJar.jar my.testapp.code1.MyMain1 arg1 arg2
>                       hadoop jar myJar.jar my.testapp.code2.MyMain2 arg1 arg2
> BR,
> Harshit
>
>
>
> On Wed, Jul 1, 2015 at 3:51 AM, Nishanth S <chinchu2884@gmail.com <ma...@gmail.com>> wrote:
>
>     Hello,
>
>     Is there a  way I can package multiple map reduce jobs  into one jar file and  then invoke them using hadoop jar.I am using maven as the build tool.What should be the main class in the manifest file in this case?.
>
>     Thanks,
>     Nishan
>
>
>
>
> -- 
> Harshit Mathur

-- 
The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation.


Re: Packaging multiple map reduce jobs into one Jar

Posted by gabriel balan <ga...@oracle.com>.
Hi

Adding to Harshit Mathur's reply:

> What should be the main class in the manifest file
 From what I remember, you must not set that. (i.e. if you set it to MyMain1, then you can't use MyMain2)

hth
Gabriel Balan


On 7/1/2015 12:02 AM, Harshit Mathur wrote:
> Yes you can do this.
> You can have multiple main in your jar, so you can run,
>             hadoop jar jarname.jar packagename.classname arguments
>
>             for eg: hadoop jar myJar.jar my.testapp.code1.MyMain1 arg1 arg2
>                       hadoop jar myJar.jar my.testapp.code2.MyMain2 arg1 arg2
> BR,
> Harshit
>
>
>
> On Wed, Jul 1, 2015 at 3:51 AM, Nishanth S <chinchu2884@gmail.com <ma...@gmail.com>> wrote:
>
>     Hello,
>
>     Is there a  way I can package multiple map reduce jobs  into one jar file and  then invoke them using hadoop jar.I am using maven as the build tool.What should be the main class in the manifest file in this case?.
>
>     Thanks,
>     Nishan
>
>
>
>
> -- 
> Harshit Mathur

-- 
The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation.


Re: Packaging multiple map reduce jobs into one Jar

Posted by gabriel balan <ga...@oracle.com>.
Hi

Adding to Harshit Mathur's reply:

> What should be the main class in the manifest file
 From what I remember, you must not set that. (i.e. if you set it to MyMain1, then you can't use MyMain2)

hth
Gabriel Balan


On 7/1/2015 12:02 AM, Harshit Mathur wrote:
> Yes you can do this.
> You can have multiple main in your jar, so you can run,
>             hadoop jar jarname.jar packagename.classname arguments
>
>             for eg: hadoop jar myJar.jar my.testapp.code1.MyMain1 arg1 arg2
>                       hadoop jar myJar.jar my.testapp.code2.MyMain2 arg1 arg2
> BR,
> Harshit
>
>
>
> On Wed, Jul 1, 2015 at 3:51 AM, Nishanth S <chinchu2884@gmail.com <ma...@gmail.com>> wrote:
>
>     Hello,
>
>     Is there a  way I can package multiple map reduce jobs  into one jar file and  then invoke them using hadoop jar.I am using maven as the build tool.What should be the main class in the manifest file in this case?.
>
>     Thanks,
>     Nishan
>
>
>
>
> -- 
> Harshit Mathur

-- 
The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation.


Re: Packaging multiple map reduce jobs into one Jar

Posted by gabriel balan <ga...@oracle.com>.
Hi

Adding to Harshit Mathur's reply:

> What should be the main class in the manifest file
 From what I remember, you must not set that. (i.e. if you set it to MyMain1, then you can't use MyMain2)

hth
Gabriel Balan


On 7/1/2015 12:02 AM, Harshit Mathur wrote:
> Yes you can do this.
> You can have multiple main in your jar, so you can run,
>             hadoop jar jarname.jar packagename.classname arguments
>
>             for eg: hadoop jar myJar.jar my.testapp.code1.MyMain1 arg1 arg2
>                       hadoop jar myJar.jar my.testapp.code2.MyMain2 arg1 arg2
> BR,
> Harshit
>
>
>
> On Wed, Jul 1, 2015 at 3:51 AM, Nishanth S <chinchu2884@gmail.com <ma...@gmail.com>> wrote:
>
>     Hello,
>
>     Is there a  way I can package multiple map reduce jobs  into one jar file and  then invoke them using hadoop jar.I am using maven as the build tool.What should be the main class in the manifest file in this case?.
>
>     Thanks,
>     Nishan
>
>
>
>
> -- 
> Harshit Mathur

-- 
The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation.


Re: Packaging multiple map reduce jobs into one Jar

Posted by Harshit Mathur <ma...@gmail.com>.
Yes you can do this.
You can have multiple main in your jar, so you can run,
            hadoop jar jarname.jar packagename.classname arguments

            for eg: hadoop jar myJar.jar my.testapp.code1.MyMain1 arg1 arg2
                      hadoop jar myJar.jar my.testapp.code2.MyMain2 arg1
arg2
BR,
Harshit



On Wed, Jul 1, 2015 at 3:51 AM, Nishanth S <ch...@gmail.com> wrote:

> Hello,
>
> Is there a  way I can package multiple map reduce jobs  into one jar file
> and  then invoke them using hadoop jar.I am using maven as the build
> tool.What should be the main class in the manifest file in this case?.
>
> Thanks,
> Nishan
>



-- 
Harshit Mathur

Re: Packaging multiple map reduce jobs into one Jar

Posted by Harshit Mathur <ma...@gmail.com>.
Yes you can do this.
You can have multiple main in your jar, so you can run,
            hadoop jar jarname.jar packagename.classname arguments

            for eg: hadoop jar myJar.jar my.testapp.code1.MyMain1 arg1 arg2
                      hadoop jar myJar.jar my.testapp.code2.MyMain2 arg1
arg2
BR,
Harshit



On Wed, Jul 1, 2015 at 3:51 AM, Nishanth S <ch...@gmail.com> wrote:

> Hello,
>
> Is there a  way I can package multiple map reduce jobs  into one jar file
> and  then invoke them using hadoop jar.I am using maven as the build
> tool.What should be the main class in the manifest file in this case?.
>
> Thanks,
> Nishan
>



-- 
Harshit Mathur

Re: Packaging multiple map reduce jobs into one Jar

Posted by Ashutosh Kumar <as...@gmail.com>.
You can use jobcontrol if the jobs have dependency .

On Wed, Jul 1, 2015 at 3:51 AM, Nishanth S <ch...@gmail.com> wrote:

> Hello,
>
> Is there a  way I can package multiple map reduce jobs  into one jar file
> and  then invoke them using hadoop jar.I am using maven as the build
> tool.What should be the main class in the manifest file in this case?.
>
> Thanks,
> Nishan
>

Re: Packaging multiple map reduce jobs into one Jar

Posted by Ashutosh Kumar <as...@gmail.com>.
You can use jobcontrol if the jobs have dependency .

On Wed, Jul 1, 2015 at 3:51 AM, Nishanth S <ch...@gmail.com> wrote:

> Hello,
>
> Is there a  way I can package multiple map reduce jobs  into one jar file
> and  then invoke them using hadoop jar.I am using maven as the build
> tool.What should be the main class in the manifest file in this case?.
>
> Thanks,
> Nishan
>

Re: Packaging multiple map reduce jobs into one Jar

Posted by Harshit Mathur <ma...@gmail.com>.
Yes you can do this.
You can have multiple main in your jar, so you can run,
            hadoop jar jarname.jar packagename.classname arguments

            for eg: hadoop jar myJar.jar my.testapp.code1.MyMain1 arg1 arg2
                      hadoop jar myJar.jar my.testapp.code2.MyMain2 arg1
arg2
BR,
Harshit



On Wed, Jul 1, 2015 at 3:51 AM, Nishanth S <ch...@gmail.com> wrote:

> Hello,
>
> Is there a  way I can package multiple map reduce jobs  into one jar file
> and  then invoke them using hadoop jar.I am using maven as the build
> tool.What should be the main class in the manifest file in this case?.
>
> Thanks,
> Nishan
>



-- 
Harshit Mathur

Re: Packaging multiple map reduce jobs into one Jar

Posted by Harshit Mathur <ma...@gmail.com>.
Yes you can do this.
You can have multiple main in your jar, so you can run,
            hadoop jar jarname.jar packagename.classname arguments

            for eg: hadoop jar myJar.jar my.testapp.code1.MyMain1 arg1 arg2
                      hadoop jar myJar.jar my.testapp.code2.MyMain2 arg1
arg2
BR,
Harshit



On Wed, Jul 1, 2015 at 3:51 AM, Nishanth S <ch...@gmail.com> wrote:

> Hello,
>
> Is there a  way I can package multiple map reduce jobs  into one jar file
> and  then invoke them using hadoop jar.I am using maven as the build
> tool.What should be the main class in the manifest file in this case?.
>
> Thanks,
> Nishan
>



-- 
Harshit Mathur