You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-dev@hadoop.apache.org by "Weili Shao (Created) (JIRA)" <ji...@apache.org> on 2012/03/16 01:36:37 UTC

[jira] [Created] (MAPREDUCE-4018) including multiple user jar files into class path is not working

including multiple user jar files into class path is not working
----------------------------------------------------------------

                 Key: MAPREDUCE-4018
                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4018
             Project: Hadoop Map/Reduce
          Issue Type: Bug
          Components: distributed-cache
    Affects Versions: 1.0.0
         Environment: submit job from Windows to Linux
            Reporter: Weili Shao


I am trying to submit a job which is using some third-party libs. I tried both -libjars and DistributedCache directly. Both are not working until I merge all jar files into one big jar file.

The way I am using -libjars: -libjars <path>/file1.jar,<path>/file2.jar,....
The way I am using DistributedCache:
        FileSystem hdfs = FileSystem.get(new URI("hdfs://remotehost:9000"), conf);
        DistributedCache.addArchiveToClassPath(new Path("<path>/file1.jar"), conf, hdfs);
        DistributedCache.addArchiveToClassPath(new Path("<path>/file2.jar"), conf, hdfs);

The error messages I observed would have been changing if I have different number of jars in the path. It looks like only one of the jars would be in the classpath for any submission. So I decided to merge all jar files into one big jar file and try again. Now it works. It looks like there is a bug to include multiple jar files into classpath.


--
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