hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alejandro Abdelnur (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MAPREDUCE-3370) MiniMRYarnCluster uses a hard coded path location for the MapReduce application jar
Date Tue, 08 Nov 2011 17:57:51 GMT

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

Alejandro Abdelnur commented on MAPREDUCE-3370:
-----------------------------------------------

Ahmed, Instead using a System property, why don't you do JAR discovery by class?

JobConf has a findContainingJar() method that if you make it public would do this for you:

The the code would be:

{{code}}
public class MiniMRYarnCluster extends MiniYARNCluster {

  public static final String APPJAR =JobConf.findContainingJar(LocalContainerLauncher.class);;
  ...

}
{{code}}


                
> MiniMRYarnCluster uses a hard coded path location for the MapReduce application jar
> -----------------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-3370
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-3370
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: mrv2, test
>    Affects Versions: 0.23.0
>            Reporter: Ahmed Radwan
>            Assignee: Ahmed Radwan
>             Fix For: 0.23.1
>
>         Attachments: MAPREDUCE-3370.patch
>
>
> MiniMRYarnCluster uses a hard coded relative path location for the MapReduce application
jar. It is better to have this location as a system property so tests can pick the application
jar regardless of their working directory.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message