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

Switch to Threaded View
Pig >> mail # user >> Unable to open iterator for alias A


Copy link to this message
-
Re: Unable to open iterator for alias A
Hi,

It seems that you are using MapReduce 2.0. Why? As far as I know it is
an alpha version. Also an extract from here
http://hortonworks.com/blog/new-features-in-apache-pig-0-10/

Hadoop 0.23 (a.k.a. Hadoop 2.0) Support

Pig 0.10.0 supports Hadoop 0.23.X. All unit and end-to-end tests
passed with hadoop-0.23. To run Pig with hadoop-0.23, you need to
recompile Pig with hadoopversion flag set to 23:

ant -Dhadoopversion=23
You also need to set up all of the environment variables necessary to
run the hadoop -23 client, plus, point HADOOP_HOME to
HADOOP_COMMON_HOME, and make sure $HADOOP_HOME/bin/hadoop exists.

Thanks

On Thu, Jun 28, 2012 at 5:31 PM, Ravi Gurbaxani
<[EMAIL PROTECTED]> wrote:
> Am trying to run a Java program that invokes a PIG script using
> PigServer.registerscript(a.pig) from Windows Eclipse and the program has to
> run on Cloudera VM.
>
> When I run I get the following error in my Windows Eclipse
>
> Exception in thread "main"
> org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1066: Unable to
> open iterator for alias A
>
>    at org.apache.pig.PigServer.openIterator(PigServer.java:901)
>
>    at
> org.apache.pig.tools.grunt.GruntParser.processDump(GruntParser.java:680)
>
>    at
> org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:303)
>
>    at
> org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:189)
>
>    at org.apache.pig.PigServer.registerScript(PigServer.java:658)
>
>    at org.apache.pig.PigServer.registerScript(PigServer.java:760)
>
>    at org.apache.pig.PigServer.registerScript(PigServer.java:723)
>
>    at remote.client.PigClient.main(PigClient.java:55)
>
> Caused by: java.io.IOException: Job terminated with anomalous status FAILED
>
>    at org.apache.pig.PigServer.openIterator(PigServer.java:893)
>
>    ... 7 more
>
>
>
> When I go to
> /var/log/hadoop-yarn/apps/<user-name>/logs/application_1340792753825_0001/localhost.localdomain_38352.
> I get this following error
>
>
>
> Caused by: java.lang.ClassNotFoundException:
> org.apache.hadoop.mapreduce.v2.app.MRAppMaster
>
>        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.hadoop.mapreduce.v2.app.MRAppMaster.  Program will exit.
>
> stdout0
>
>        VERSION*(&container_1340792753825_0001_01_000001none�=�
> =data:BCFile.indexnoneω
>
> After some reading seems I had to setup certain environment variables in
> yarn-evn.sh. here's the values in the yarn-env.sh
>
> export HADOOP_COMMON_HOME=/usr/lib/hadoop
>
> export HADOOP_HDFS_HOME=/usr/lib/hadoop-hdfs
>
> export YARN_HOME=/usr/lib/hadoop-yarn
>
> export HADOOP_CONF_DIR=/etc/hadoop/conf.pseudo
>
> export YARN_CONF_DIR=$HADOOP_CONF_DIR
>
> Please help me with the same

--
Best Regards,
Ruslan Al-Fakikh