hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hadoop QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-9424) The "hadoop jar" invocation should include the passed jar on the classpath as a whole
Date Wed, 10 Aug 2016 00:59:20 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-9424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15414536#comment-15414536
] 

Hadoop QA commented on HADOOP-9424:
-----------------------------------

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m  0s{color} | {color:blue}
Docker mode activated. {color} |
| {color:red}-1{color} | {color:red} patch {color} | {color:red}  0m  5s{color} | {color:red}
HADOOP-9424 does not apply to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hadoop/HowToContribute
for help. {color} |
\\
\\
|| Subsystem || Report/Notes ||
| JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12574763/HADOOP-9424.patch
|
| JIRA Issue | HADOOP-9424 |
| Console output | https://builds.apache.org/job/PreCommit-HADOOP-Build/10215/console |
| Powered by | Apache Yetus 0.4.0-SNAPSHOT   http://yetus.apache.org |


This message was automatically generated.



> The "hadoop jar" invocation should include the passed jar on the classpath as a whole
> -------------------------------------------------------------------------------------
>
>                 Key: HADOOP-9424
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9424
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 2.0.3-alpha
>            Reporter: Harsh J
>            Assignee: Harsh J
>            Priority: Minor
>              Labels: BB2015-05-TBR
>         Attachments: HADOOP-9424.patch
>
>
> When you have a case such as this:
> {{X.jar -> Classes = Main, Foo}}
> {{Y.jar -> Classes = Bar}}
> With implementation details such as:
> * Main references Bar and invokes a public, static method on it.
> * Bar does a class lookup to find Foo (Class.forName("Foo")).
> Then when you do a {{HADOOP_CLASSPATH=Y.jar hadoop jar X.jar Main}}, the Bar's method
fails with a ClassNotFound exception cause of the way RunJar runs.
> RunJar extracts the passed jar and includes its contents on the ClassLoader of its current
thread but the {{Class.forName(…)}} call from another class does not check that class loader
and hence cannot find the class as its not on any classpath it is aware of.
> The script of "hadoop jar" should ideally include the passed jar argument to the CLASSPATH
before RunJar is invoked, for this above case to pass.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message