You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Wouter de Bie <wo...@deltaprojects.se> on 2010/07/21 16:09:56 UTC
Thread safety
Hi all,
We're building an application that starts multiple pig jobs in parallel by using PigServer. However, Pig doesn't seem to be thread-safe. And since we're running a Java application, I'm not sure how to solve this.
Does anyone have an idea?
// Wouter
Re: Thread safety
Posted by Anthony Urso <an...@cs.ucla.edu>.
You may want to try instantiating a PigServer for each thread via
thread local storage.
http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/java/lang/ThreadLocal.html
On Wed, Jul 21, 2010 at 7:09 AM, Wouter de Bie
<wo...@deltaprojects.se> wrote:
> Hi all,
>
> We're building an application that starts multiple pig jobs in parallel by using PigServer. However, Pig doesn't seem to be thread-safe. And since we're running a Java application, I'm not sure how to solve this.
>
> Does anyone have an idea?
>
> // Wouter
>