Description
With pig.opt.bytecode=true with PIG-5256, TestScriptLanguage.runParallelTest2, Jython_CompileBindRun_3 fail with following error
java.lang.LinkageError: loader (instance of org/apache/pig/impl/PigContext$ContextClassLoader): attempted duplicate class definition for name: "org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POForEach_scope_6"
Since NodeIdGenerator is ThreadLocal, running same script in parallel with different parameters using embedded Python causes conflict in the name of class files generated. Conflicts need to be handled in
- PigContext classloader by making it ThreadLocal
- Class files should have another identifier to differentiate between multiple scripts.