Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-7172

Wildcard functionality of -libjar is broken when jars are located in same remote FS

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      We recently found that when -libjar specified jars on the same remote FS, jars will not be properly added to classpath. 

      The reason is MAPREDUCE-6719 added the wildcard functionality, but the follow logic assumes files are all placed under job's submission directory. (Inside JobResourceUploader)

      if (useWildcard && !foundFragment) {
        // Add the whole directory to the cache using a wild card
        Path libJarsDirWildcard =
            jtFs.makeQualified(new Path(libjarsDir, DistributedCache.WILDCARD));
        DistributedCache.addCacheFile(libJarsDirWildcard.toUri(), conf);
      }

      However, in the same method, specified resources will be only uploaded when two FSes are different, see copyRemoteFiles:

      if (FileUtil.compareFs(remoteFs, jtFs)) {
        return originalPath;
      } 

      Workaround of this issue is pass:

      mapreduce.client.libjars.wildcard = false.

      When the MR job got launched. 

      Example commandline to reproduce this issue is: 

      hadoop jar abc.jar org.ABC -libjars "wasb://host/path1/jar1,wasb://host/path2/jar2..."

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                leftnoteasy Wangda Tan
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: