You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Anyi Li (JIRA)" <ji...@apache.org> on 2017/03/01 04:03:45 UTC
[jira] [Updated] (PIG-5160) SchemaTupleFrontend.java is not thread
safe, cause PigServer thrown NPE in multithread env
[ https://issues.apache.org/jira/browse/PIG-5160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anyi Li updated PIG-5160:
-------------------------
Summary: SchemaTupleFrontend.java is not thread safe, cause PigServer thrown NPE in multithread env (was: Make PigServer thread safe)
> SchemaTupleFrontend.java is not thread safe, cause PigServer thrown NPE in multithread env
> ------------------------------------------------------------------------------------------
>
> Key: PIG-5160
> URL: https://issues.apache.org/jira/browse/PIG-5160
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.17.0
> Reporter: Anyi Li
> Assignee: Anyi Li
> Labels: patch
> Attachments: PIG_5160.patch
>
>
> Calling PigServer in multi-thread environment will randomly throw NPE at
> {code}
> Caused by: org.apache.pig.backend.executionengine.ExecException: ERROR 0: java.lang.NullPointerException
> at org.apache.pig.backend.hadoop.executionengine.HExecutionEngine.launchPig(HExecutionEngine.java:310)
> at org.apache.pig.PigServer.launchPlan(PigServer.java:1390)
> at org.apache.pig.PigServer.executeCompiledLogicalPlan(PigServer.java:1375)
> at org.apache.pig.PigServer.storeEx(PigServer.java:1034)
> ... 6 more
> Caused by: java.lang.NullPointerException
> at org.apache.pig.data.SchemaTupleFrontend.registerToGenerateIfPossible(SchemaTupleFrontend.java:255)
> at org.apache.pig.newplan.logical.relational.LogToPhyTranslationVisitor.visit(LogToPhyTranslationVisitor.java:876)
> at org.apache.pig.newplan.logical.relational.LOForEach.accept(LOForEach.java:87)
> at org.apache.pig.newplan.DependencyOrderWalker.walk(DependencyOrderWalker.java:75)
> at org.apache.pig.newplan.PlanVisitor.visit(PlanVisitor.java:52)
> at org.apache.pig.backend.hadoop.executionengine.HExecutionEngine.compile(HExecutionEngine.java:260)
> at org.apache.pig.backend.hadoop.executionengine.HExecutionEngine.launchPig(HExecutionEngine.java:295)
> ... 9 more
> {code}
> because SchemaTupleFrontend.java has lots of static methods which refer to static variables. Need a patch to create threadlocal variables to make it thread safe
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)