Return-Path: X-Original-To: apmail-pig-user-archive@www.apache.org Delivered-To: apmail-pig-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EA8609074 for ; Tue, 13 Mar 2012 13:06:22 +0000 (UTC) Received: (qmail 56291 invoked by uid 500); 13 Mar 2012 13:06:22 -0000 Delivered-To: apmail-pig-user-archive@pig.apache.org Received: (qmail 56263 invoked by uid 500); 13 Mar 2012 13:06:22 -0000 Mailing-List: contact user-help@pig.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@pig.apache.org Delivered-To: mailing list user@pig.apache.org Received: (qmail 56254 invoked by uid 99); 13 Mar 2012 13:06:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Mar 2012 13:06:22 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jpampliega@gmail.com designates 209.85.214.49 as permitted sender) Received: from [209.85.214.49] (HELO mail-bk0-f49.google.com) (209.85.214.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Mar 2012 13:06:16 +0000 Received: by bkcjk13 with SMTP id jk13so644192bkc.22 for ; Tue, 13 Mar 2012 06:05:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=VlsYgokgtcma3pNiHT9ywNfPgWG7n/cZuGbcd/hv2G0=; b=BziHc/9b7nlZT+IoBYXs3IK4L00sIx0raCBnHfo3ltwTlAJ8DGcNQmOau5zX6IkqvH WVacJXAI3yeEFL/y0iWi2l1sSrGf/rVq9MgYdp0fBcdwujKjlQfh6NAsU0NybinVF7tt VlM+qZ6kIlpJ5exlgd2jRr0tNub+gwoA21lPrTJlcU2AGgbLWqYK7MXjB2Px5axh4wI2 jfQRPTNRFtgAUuB3IlIqCwIvxSdyM38/s7skIZq/OiEYY2RLlM/oop5J9A/KLTK3YwGT CK3R6epAeazwgWiE8e1vZlhorhBzvoRRWb8rnOybmpqo8IgNnYYfw5BsY/Xc7tN8FQBy M/Pw== MIME-Version: 1.0 Received: by 10.204.150.72 with SMTP id x8mr6304650bkv.60.1331643955183; Tue, 13 Mar 2012 06:05:55 -0700 (PDT) Received: by 10.204.22.16 with HTTP; Tue, 13 Mar 2012 06:05:55 -0700 (PDT) In-Reply-To: References: Date: Tue, 13 Mar 2012 10:05:55 -0300 Message-ID: Subject: Re: Problem running Pig script with Jython From: Juan Martin Pampliega To: user@pig.apache.org Content-Type: multipart/alternative; boundary=00151747afb8ea7f7104bb1f8425 X-Virus-Checked: Checked by ClamAV on apache.org --00151747afb8ea7f7104bb1f8425 Content-Type: text/plain; charset=ISO-8859-1 Hi, Sory for being repetitive but I just wanted to know if anyone had any idea about how to get around this issue. On Sat, Mar 3, 2012 at 8:11 PM, Juan Martin Pampliega wrote: > Hi, > > I'm currently trying to run the following Jython script: > > #!/usr/bin/python > > from org.apache.pig.scripting import * > > res = Pig.compile("""loaded1 = LOAD 'hbase://tfinger' USING > org.apache.pig.backend.hadoop.hbase.HBaseStorage('group_str:*', '-loadKey > true') AS (id:chararray, group:map[]);dump loaded1;""").bind().runSingle() > if res.isSuccessful(): > print 'SUCCESS' > else: > print 'FAIL' > > When I run it directly as a Pig script with the command "pig -x local > [RunPigScript.py]" it works fine. When I run it through Eclipse or directly > from the commandline with the Jython command I get the following error: > > > Traceback (most recent call last): > File "RunPigScript.py", line 11, in > pig = Pig.compile(""" > at org.apache.pig.scripting.Pig.getScriptContext(Pig.java:373) > at org.apache.pig.scripting.Pig.compile(Pig.java:158) > at org.apache.pig.scripting.Pig.compile(Pig.java:145) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > > java.io.IOException: java.io.IOException: Script context is not set > > Any ideas on how to get around this issue? I'm running Pig 0.9.1 on local > mode. > --00151747afb8ea7f7104bb1f8425--