Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig, mail # user - problems running pig script


+
Iferulz Yahadinel 2010-08-10, 06:42
Copy link to this message
-
Re: problems running pig script
Ashutosh Chauhan 2010-08-10, 17:02
Try:
laptop:~/pig-0.7.0$ java -cp $HADOOPDIR:pig.jar
org.apache.pig.Main specialscript.pig

use pig.jar NOT pig-0.7.0-core.jar

Ashutosh

On Mon, Aug 9, 2010 at 23:42, Iferulz Yahadinel <[EMAIL PROTECTED]> wrote:

> I get two type of errors when i try to run this pig script:
> REGISTER reu.log;
> A = LOAD 'image.log' AS (image: chararray);
> B = FOREACH A GENERATE reu.imageprocessor1(image);
> DUMP B;
>
>
>
> laptop:~/pig-0.7.0$ java -cp pig-0.7.0-core.jar org.apache.pig.Main -x
> local specialscript.pig
> 10/08/10 02:16:52 INFO pig.Main: Logging error messages to:
> /home/hadoop/pig-0.7.0/pig_1281421012366.log
> 2010-08-10 02:16:52,567 [main] INFO
> org.apache.pig.backend.hadoop.executionengine.HExecutionEngine -
> Connecting to hadoop file system at: file:///
> 2010-08-10 02:16:53,087 [main] ERROR org.apache.pig.tools.grunt.Grunt -
> ERROR 1070: Could not resolve reu.imageprocessor1 using imports: [,
> org.apache.pig.builtin., org.apache.pig.impl.builtin.]
> Details at logfile: /home/hadoop/pig-0.7.0/pig_1281421012366.log
> laptop:~/pig-0.7.0$
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> laptop:~/pig-0.7.0$ java -cp $PIGDIR/pig-0.7.0-core.jar:$HADOOPDIR
> org.apache.pig.Main specialscript.pig
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/pig/Main
> Caused by: java.lang.ClassNotFoundException: org.apache.pig.Main
>        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> Could not find the main class: org.apache.pig.Main.  Program will exit.
> laptop:~/pig-0.7.0$
>