org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1066: Unable to open iterator for alias ranked

Apache's JIRA Issue Tracker | Mykhaylo Telizhyn | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    steps to reproduce: 1) create an empty file on hdfs (e.g. /user/root/test/empty.txt) 2) execute the following pig script: records = LOAD '/user/root/test/empty.txt' AS (Amount: DOUBLE); ranked = RANK records BY Amount DESC; DUMP ranked; 3) on console you will get " ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2043: Unexpected error during execution." and in pig's logs you will see: Pig Stack Trace {code} --------------- ERROR 2043: Unexpected error during execution. org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1066: Unable to open iterator for alias ranked at org.apache.pig.PigServer.openIterator(PigServer.java:880) at org.apache.pig.tools.grunt.GruntParser.processDump(GruntParser.java:774) at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:372) at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:198) at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:173) at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:84) at org.apache.pig.Main.run(Main.java:607) at org.apache.pig.Main.main(Main.java:156) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.hadoop.util.RunJar.main(RunJar.java:212) Caused by: org.apache.pig.PigException: ERROR 1002: Unable to store alias ranked at org.apache.pig.PigServer.storeEx(PigServer.java:982) at org.apache.pig.PigServer.store(PigServer.java:942) at org.apache.pig.PigServer.openIterator(PigServer.java:855) ... 12 more Caused by: org.apache.pig.backend.executionengine.ExecException: ERROR 2043: Unexpected error during execution. at org.apache.pig.PigServer.launchPlan(PigServer.java:1333) at org.apache.pig.PigServer.executeCompiledLogicalPlan(PigServer.java:1307) at org.apache.pig.PigServer.storeEx(PigServer.java:978) ... 14 more Caused by: java.lang.RuntimeException: Error to read counters into Rank operation counterSize 0 at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.saveCounters(JobControlCompiler.java:386) at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.updateMROpPlan(JobControlCompiler.java:332) at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher.launchPig(MapReduceLauncher.java:387) at org.apache.pig.PigServer.launchPlan(PigServer.java:1322) ... 16 more Caused by: java.lang.NullPointerException at org.apache.hadoop.mapreduce.counters.Limits.filterName(Limits.java:44) at org.apache.hadoop.mapreduce.counters.Limits.filterGroupName(Limits.java:52) at org.apache.hadoop.mapreduce.counters.AbstractCounters.getGroup(AbstractCounters.java:220) at org.apache.hadoop.mapred.Counters.getGroup(Counters.java:113) at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.saveCounters(JobControlCompiler.java:360) ... 19 more ================================================================================ {code}

    Apache's JIRA Issue Tracker | 3 years ago | Mykhaylo Telizhyn
    org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1066: Unable to open iterator for alias ranked
  2. 0

    steps to reproduce: 1) create an empty file on hdfs (e.g. /user/root/test/empty.txt) 2) execute the following pig script: records = LOAD '/user/root/test/empty.txt' AS (Amount: DOUBLE); ranked = RANK records BY Amount DESC; DUMP ranked; 3) on console you will get " ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2043: Unexpected error during execution." and in pig's logs you will see: Pig Stack Trace {code} --------------- ERROR 2043: Unexpected error during execution. org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1066: Unable to open iterator for alias ranked at org.apache.pig.PigServer.openIterator(PigServer.java:880) at org.apache.pig.tools.grunt.GruntParser.processDump(GruntParser.java:774) at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:372) at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:198) at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:173) at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:84) at org.apache.pig.Main.run(Main.java:607) at org.apache.pig.Main.main(Main.java:156) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.hadoop.util.RunJar.main(RunJar.java:212) Caused by: org.apache.pig.PigException: ERROR 1002: Unable to store alias ranked at org.apache.pig.PigServer.storeEx(PigServer.java:982) at org.apache.pig.PigServer.store(PigServer.java:942) at org.apache.pig.PigServer.openIterator(PigServer.java:855) ... 12 more Caused by: org.apache.pig.backend.executionengine.ExecException: ERROR 2043: Unexpected error during execution. at org.apache.pig.PigServer.launchPlan(PigServer.java:1333) at org.apache.pig.PigServer.executeCompiledLogicalPlan(PigServer.java:1307) at org.apache.pig.PigServer.storeEx(PigServer.java:978) ... 14 more Caused by: java.lang.RuntimeException: Error to read counters into Rank operation counterSize 0 at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.saveCounters(JobControlCompiler.java:386) at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.updateMROpPlan(JobControlCompiler.java:332) at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher.launchPig(MapReduceLauncher.java:387) at org.apache.pig.PigServer.launchPlan(PigServer.java:1322) ... 16 more Caused by: java.lang.NullPointerException at org.apache.hadoop.mapreduce.counters.Limits.filterName(Limits.java:44) at org.apache.hadoop.mapreduce.counters.Limits.filterGroupName(Limits.java:52) at org.apache.hadoop.mapreduce.counters.AbstractCounters.getGroup(AbstractCounters.java:220) at org.apache.hadoop.mapred.Counters.getGroup(Counters.java:113) at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.saveCounters(JobControlCompiler.java:360) ... 19 more ================================================================================ {code}

    Apache's JIRA Issue Tracker | 3 years ago | Mykhaylo Telizhyn
    org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1066: Unable to open iterator for alias ranked

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.apache.hadoop.mapreduce.counters.Limits.filterName()
    2. Hadoop
      Counters.getGroup
      1. org.apache.hadoop.mapreduce.counters.Limits.filterName(Limits.java:44)
      2. org.apache.hadoop.mapreduce.counters.Limits.filterGroupName(Limits.java:52)
      3. org.apache.hadoop.mapreduce.counters.AbstractCounters.getGroup(AbstractCounters.java:220)
      4. org.apache.hadoop.mapred.Counters.getGroup(Counters.java:113)
      4 frames
    3. org.apache.pig
      Main.main
      1. org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.saveCounters(JobControlCompiler.java:360)
      2. org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.updateMROpPlan(JobControlCompiler.java:332)
      3. org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher.launchPig(MapReduceLauncher.java:387)
      4. org.apache.pig.PigServer.launchPlan(PigServer.java:1322)
      5. org.apache.pig.PigServer.executeCompiledLogicalPlan(PigServer.java:1307)
      6. org.apache.pig.PigServer.storeEx(PigServer.java:978)
      7. org.apache.pig.PigServer.store(PigServer.java:942)
      8. org.apache.pig.PigServer.openIterator(PigServer.java:855)
      9. org.apache.pig.tools.grunt.GruntParser.processDump(GruntParser.java:774)
      10. org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:372)
      11. org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:198)
      12. org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:173)
      13. org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:84)
      14. org.apache.pig.Main.run(Main.java:607)
      15. org.apache.pig.Main.main(Main.java:156)
      15 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    5. Hadoop
      RunJar.main
      1. org.apache.hadoop.util.RunJar.main(RunJar.java:212)
      1 frame