hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Nauroth (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MAPREDUCE-5021) Add an addDirectoryToClassPath method DistributedCache
Date Fri, 22 Feb 2013 18:50:12 GMT

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

Chris Nauroth commented on MAPREDUCE-5021:

The method isn't exactly suitable for the feature described here, but it might be an opportunity
for refactoring and reuse.

What I meant by this comment is that calling {{FileUtil#createJarWithClassPath}} won't help
build this feature, but the method contains code that might be reusable if refactored out.
 The method contains code very similar to what you just posted:

// Append all jars that match the wildcard
Path globPath = new Path(classPathEntry).suffix("{.jar,.JAR}");
FileStatus[] wildcardJars = FileContext.getLocalFSFileContext().util()
if (wildcardJars != null) {
  for (FileStatus wildcardJar: wildcardJars) {

> Add an addDirectoryToClassPath method DistributedCache
> ------------------------------------------------------
>                 Key: MAPREDUCE-5021
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5021
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: client, distributed-cache
>    Affects Versions: 2.0.3-alpha
>            Reporter: Sandy Ryza
> As adding a directory of jars to the class path is a common use for the distributed cache
it would be easier on API consumers if they were able to call a method that would add all
the the files in a directory for them. 

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message