Vikram
Vikram

Reputation: 51

ERROR 1066: Unable to open iterator for alias in Pig 0.14

I have Hadoop version 2.7.1 and Pig 0.14.0 installed on CentOS PC. I tried running Pig dump command on Grunt shell, but it failed with below error:

[main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1066: Unable to open iterator for alias 

Below are the commands I am running:

grunt> youtube_dump = LOAD '/youtubedata.txt' as (video_id:chararray , uploader:chararray, upload_interval : int, category:chararray, video_length:int, views:int, rating:float, no_rating:int, no_comments:int, related_video_ids:chararray);

grunt> grp_by_category = GROUP youtube_dump by category;

grunt> dump grp_by_category;

If I try Pig in local mode with file youtubedata.txt copied to local disk, I don't get any error.

Upvotes: 0

Views: 823

Answers (1)

Vikram
Vikram

Reputation: 51

I was finally able to resolve the issue. Here's what I found after doing some research. Apparently, my yarn-site.xml was in-correctly configured.There was a typo in the property name section. Instead of "yarn.nodemanager.aux-services" it was "yarn.nodemanager.aux-service" (missing letter "s" in services).

After updating conf file yarn-site.xml correctly, I was able to run pig commands without any error.

Upvotes: 1

Related Questions