Hi

I am using pig 0.9.2. Trying to run embedded pig in python but get this
error

I have all hadoop lib jars, pig-0.9.2-withouthadoop.jar and
jython-2.5.2.jar in class path

CLASSPATH=
/etc/hadoop
/usr/lib/jvm/java-6-sun/lib/tools.jar
/usr/share/hadoop/lib/*.jar
/etc/pig
/etc/hadoop
/usr/share/pig/lib/jython-2.5.2.jar <--replaced this jar with jython-2.5.2
standalone as per https://issues.apache.org/jira/browse/PIG-2665
/etc/hadoop
/usr/share/pig/pig-0.9.2-withouthadoop.jar

java -cp $CLASSPATH org.python.util.jython
/usr/share/MAB/PaasApp/testembed.py
Traceback (most recent call last):
  File "~/testembed.py", line 12, in <module>
    P = Pig.compileFromFile("""~/testembed.pig""")
 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.compileFromFile(Pig.java:191)
 at org.apache.pig.scripting.Pig.compileFromFile(Pig.java:175)
 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

On the other hand running the same script using

pig testembed.py

runs fine

What am I missing?

Thanks in advance

- Agateaaa

Reply via email to