when i run using java -cp
$>java -cp /usr/local/pig/pig-0.9.1.jar:/usr/local/jython2.5.2/jython.jar
sample.py
Exception in thread "main" java.lang.NoClassDefFoundError: sample/py
Caused by: java.lang.ClassNotFoundException: sample.py
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: sample.py. Program will exit.
please help
On Thu, Jan 12, 2012 at 12:11 PM, rahul raghavendhra <
[email protected]> wrote:
>
> How to run as a script file
>
> pig script.py ??
>
> please help
> ./rahul
>
> On Thu, Jan 12, 2012 at 12:06 PM, rahul raghavendhra <
> [email protected]> wrote:
>
>> I am a newbie.. please make it so clear..
>>
>>
>> when i inside bin as
>> pig sample.py
>>
>> i got this error..
>>
>> hadoop1@karthi-ericsson:/usr/
>> local/pig/bin$ pig sample.py
>> 2012-01-12 11:53:14,475 [main] INFO org.apache.pig.Main - Logging error
>> messages to: /usr/local/pig/bin/pig_1326349394473.log
>> 2012-01-12 11:53:14,485 [main] INFO org.apache.pig.Main - Run embedded
>> script: jython
>> 2012-01-12 11:53:14,597 [main] INFO
>> org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting
>> to hadoop file system at: hdfs://localhost:54310
>> 2012-01-12 11:53:14,736 [main] INFO
>> org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting
>> to map-reduce job tracker at: localhost:54311
>> hadoop1@karthi-ericsson:/usr/local/pig/bin$
>>
>> how to run as a script file
>>
>>
>> On Thu, Jan 12, 2012 at 12:01 PM, Daniel Dai <[email protected]>wrote:
>>
>>> Hi, Rahul,
>>> Embedding mode does not work with grunt. Please run as a script file.
>>>
>>> Daniel
>>>
>>> On Wed, Jan 11, 2012 at 10:24 PM, rahul raghavendhra <
>>> [email protected]> wrote:
>>>
>>> > i have downloaded jython jar and installed it.. but i couldnt run pig
>>> > scripts using py script... i have created a .py in pig/bin forder..
>>> how to
>>> > run the pig.. pig wiki is not so clear..please help.
>>> >
>>> > when i run the script inside grunt as run sample.py
>>> >
>>> > i got the following error
>>> >
>>> > grunt> #!/usr/bin/python
>>> > grunt> from org.apache.pig.scripting import Pig
>>> > 2012-01-12 11:50:18,637 [main] ERROR org.apache.pig.tools.grunt.Grunt
>>> -
>>> > ERROR 1000: Error during parsing. Encountered " <IDENTIFIER> "from ""
>>> at
>>> > line 2, column 1.
>>> >
>>> >
>>> > when i inside bin as pig sample.py
>>> > i got this error..
>>> > hadoop1@karthi-ericsson:/usr/local/pig/bin$ pig sample.py
>>> > 2012-01-12 11:53:14,475 [main] INFO org.apache.pig.Main - Logging
>>> error
>>> > messages to: /usr/local/pig/bin/pig_1326349394473.log
>>> > 2012-01-12 11:53:14,485 [main] INFO org.apache.pig.Main - Run
>>> embedded
>>> > script: jython
>>> > 2012-01-12 11:53:14,597 [main] INFO
>>> > org.apache.pig.backend.hadoop.executionengine.HExecutionEngine -
>>> Connecting
>>> > to hadoop file system at: hdfs://localhost:54310
>>> > 2012-01-12 11:53:14,736 [main] INFO
>>> > org.apache.pig.backend.hadoop.executionengine.HExecutionEngine -
>>> Connecting
>>> > to map-reduce job tracker at: localhost:54311
>>> > hadoop1@karthi-ericsson:/usr/local/pig/bin$
>>> >
>>> >
>>> > please help
>>> > ./rahul
>>> >
>>>
>>
>>
>