ERROR 1066: Unable to open iterator for alias - Pig

后端 未结 4 1009
轮回少年
轮回少年 2020-11-30 12:46

Just started Pig; trying to load the data from a file and dump it henceforth. Loading seems to be proper, no error is thrown. Below is the query:

NYSE

相关标签:
4条回答
  • 2020-11-30 13:23

    Are you running a pig 0.12.0 or earlier jar against hadoop 2.2, if this is the case then I managed to get around this error by recompiling the pig jar from src, here is a summary of the steps involved on a debian type box

    1. download the pig-0.12.0.tar.gz

    2. unpack the jar and set permissions

    3. then inside the unpacked directory compile the src with 'ant clean jar -Dhadoopversion=23'

    then you need to get the jar on your class-path in maven, for example, in the same directory

    mvn install:install-file -Dfile=pig.jar -DgroupId={set a groupId}-
                     DartifactId={set a artifactId} -Dversion=1.0 -Dpackaging=jar  
    

    or if in eclipse then add jar as external libary/dependency

    I was getting your exact trace trying to run pig 12 in a hadoop 2.2.0 and the above steps worked for me

    UPDATE
    I posted my issue on the pig jira and they responded. They have a pig jar already compiled for hadoop2 pig-h2.jar here http://search.maven.org/#artifactdetails|org.apache.pig|pig|0.12.0|jar
    a maven tag for this jar is

      <dependency>
           <groupId>org.apache.pig</groupId>
           <artifactId>pig</artifactId>
          <classifier>h2</classifier>
          <version>0.12.0</version>
          <scope>provided</scope>
      </dependency>  
    
    0 讨论(0)
  • 2020-11-30 13:30

    You can place breakpoint to class PigServer to method store().

    for(JobStats js : stats.getJobGraph()){
      if(js.getException() != null) {
        ex = js.getException();
      }
    }
    

    Inside the js object there is field errorMessage and it may contain description of the problem

    0 讨论(0)
  • 2020-11-30 13:35

    I also meet this problem. And then I see this link: http://www.fanli7.net/a/JAVAbiancheng/ANT/20140325/441264.html

    I just replace pig version from 0.12.0 to 0.13.0 and the problem is solved. (Here, my hadoop version is 2.3.0)

    0 讨论(0)
  • 2020-11-30 13:37

    This could be due to a change in the Pig Version starting 0.12. The specific change is that Pig used to be permissive and automatically ignore the first line in the data file or it would interpret that line as column names, in the new version of Pig this permissiveness was removed. The work around is to delete the column names from the input file and this should solve the problem

    Kapil

    0 讨论(0)
提交回复
热议问题