You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Jay Vyas <ja...@gmail.com> on 2012/10/06 00:00:17 UTC

setJarByClass method semantics

Hi guys:

What does the setJarByClass method do, if for example ,a given class does
not exist inside of a JAR file?  For example, in the case that we are
running compiled java classes as-is.  I can't imagine what the "Default"
behaviour for such a scenario would be, since the semantics of the method
imply that all hadoop jobs run in the context of a precompiled jar file.

-- 
Jay Vyas
MMSB/UCHC

Re: setJarByClass method semantics

Posted by Harsh J <ha...@cloudera.com>.
Looks at classpath, tries to find resource URL behind the provided
class (looking specifically for jar resources), if found, sets as the
job jar.

Running with .class files doesn't work currently - and the job submits
without a jar carrying the classes. This is typically what happens
when you use an IDE like Eclipse and try to submit a job without
bundling a jar up first. The job triggers and fails with CNF
exceptions.

On Sat, Oct 6, 2012 at 3:30 AM, Jay Vyas <ja...@gmail.com> wrote:
> Hi guys:
>
> What does the setJarByClass method do, if for example ,a given class does
> not exist inside of a JAR file?  For example, in the case that we are
> running compiled java classes as-is.  I can't imagine what the "Default"
> behaviour for such a scenario would be, since the semantics of the method
> imply that all hadoop jobs run in the context of a precompiled jar file.
>
> --
> Jay Vyas
> MMSB/UCHC



-- 
Harsh J