Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-2622

Jython imports fails if the Lib modules are shipped under the jar

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • None
    • None

    Description

      PySystemState has getJarFileName() api that does searches for the jar that has class PySystemState Class. The answer it expects is –
      jar:file:/install_dir/jython.jar!/org/python/core/PySystemState.class
      Then it pulls out </install_dir/jython.jar> out of above string and in initPath adds python.path and </install_dir/jython.jar>/Lib to sys.path.

      With MAPREDUCE-967, job.jar is not unpacked on the task node. The job.jar always has jython code (as pig ships it from scriptjars when register is invoked). Hence, above code path puts /Lib inside job.jar on sys.path and all works fine.
      But, without MAPREDUCE-967, job.jar is unpacked into jobcachedir. So, getJarFileName in above code in jython returns null and it never gets <jython>.jar on classpath as its unpacked.

      Attachments

        Activity

          People

            Unassigned Unassigned
            aniket486 Aniket Namadeo Mokashi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: