Return-Path: X-Original-To: apmail-pig-dev-archive@www.apache.org Delivered-To: apmail-pig-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DA16610C91 for ; Thu, 27 Mar 2014 23:03:28 +0000 (UTC) Received: (qmail 76586 invoked by uid 500); 27 Mar 2014 23:03:20 -0000 Delivered-To: apmail-pig-dev-archive@pig.apache.org Received: (qmail 76429 invoked by uid 500); 27 Mar 2014 23:03:18 -0000 Mailing-List: contact dev-help@pig.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pig.apache.org Delivered-To: mailing list dev@pig.apache.org Received: (qmail 76261 invoked by uid 500); 27 Mar 2014 23:03:16 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 76220 invoked by uid 99); 27 Mar 2014 23:03:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Mar 2014 23:03:16 +0000 Date: Thu, 27 Mar 2014 23:03:16 +0000 (UTC) From: "Akihiro Matsukawa (JIRA)" To: pig-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (PIG-3844) Make ScriptState InheritableThreadLocal for threads that need it MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PIG-3844?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Akihiro Matsukawa updated PIG-3844: ----------------------------------- Patch Info: Patch Available > Make ScriptState InheritableThreadLocal for threads that need it > ---------------------------------------------------------------- > > Key: PIG-3844 > URL: https://issues.apache.org/jira/browse/PIG-3844 > Project: Pig > Issue Type: Improvement > Reporter: Akihiro Matsukawa > Assignee: Akihiro Matsukawa > Attachments: PIG-3844.patch > > > I have a PPNL that is forked off the main thread so that its operations does not block pig from continuing to run. This PPNL needs the ScriptState, but is not able to get it in pig13 because the ScriptState is ThreadLocal. > In pig12, this worked because there was logic to start a new ScriptState on ScriptState.get() which was removed in PIG-3525 (https://reviews.apache.org/r/15634). > My proposal is to change ScriptState to be InheritableThreadLocal, so that any new child threads that are spawned will have a copy of it. I have a pretty limited understanding of pig, but I do not see anything that this proposed change would break. -- This message was sent by Atlassian JIRA (v6.2#6252)