You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Aniket Mokashi (Created) (JIRA)" <ji...@apache.org> on 2012/03/29 23:27:26 UTC

[jira] [Created] (PIG-2622) Jython imports fails if the Lib modules are shipped under the jar

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

                 Key: PIG-2622
                 URL: https://issues.apache.org/jira/browse/PIG-2622
             Project: Pig
          Issue Type: Bug
            Reporter: Aniket Mokashi


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.

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