Pig script failed to parse: NoViableAltException(84@[])

阅读更多
出现以下错误的主要原因就是filter 语句的逻辑有问题,可以看看by关键词后面的部分。

ERROR 1200: Pig script failed to parse: NoViableAltException(84@[])

org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: Error during parsing. Pig script failed to parse: NoViableAltException(84@[])
	at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1748)
	at org.apache.pig.PigServer$Graph.access$000(PigServer.java:1443)
	at org.apache.pig.PigServer.parseAndBuild(PigServer.java:387)
	at org.apache.pig.PigServer.executeBatch(PigServer.java:412)
	at org.apache.pig.PigServer.executeBatch(PigServer.java:398)
	at org.apache.pig.tools.grunt.GruntParser.executeBatch(GruntParser.java:171)
	at org.apache.pig.tools.grunt.GruntParser.processRemove(GruntParser.java:1099)
	at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:610)
	at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:230)
	at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:205)
	at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:81)
	at org.apache.pig.Main.run(Main.java:502)
	at org.apache.pig.PigRunner.run(PigRunner.java:49)
	at org.apache.oozie.action.hadoop.PigMain.runPigJob(PigMain.java:286)
	at org.apache.oozie.action.hadoop.PigMain.run(PigMain.java:229)
	at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:47)
	at org.apache.oozie.action.hadoop.PigMain.main(PigMain.java:76)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:236)
	at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
	at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:453)
	at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
	at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler.runSubtask(LocalContainerLauncher.java:380)
	at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler.runTask(LocalContainerLauncher.java:301)
	at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler.access$200(LocalContainerLauncher.java:187)
	at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler$1.run(LocalContainerLauncher.java:230)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: Failed to parse: Pig script failed to parse: NoViableAltException(84@[])
	at org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:199)
	at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1735)
	... 33 more
Caused by: NoViableAltException(84@[])
	at org.apache.pig.parser.AstValidator.expr(AstValidator.java:8668)
	at org.apache.pig.parser.AstValidator.expr(AstValidator.java:9146)
	at org.apache.pig.parser.AstValidator.cond(AstValidator.java:7769)
	at org.apache.pig.parser.AstValidator.filter_clause(AstValidator.java:7359)
	at org.apache.pig.parser.AstValidator.op_clause(AstValidator.java:1683)
	at org.apache.pig.parser.AstValidator.general_statement(AstValidator.java:1035)
	at org.apache.pig.parser.AstValidator.statement(AstValidator.java:499)
	at org.apache.pig.parser.AstValidator.query(AstValidator.java:373)
	at org.apache.pig.parser.QueryParserDriver.validateAst(QueryParserDriver.java:258)
	at org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:186)

你可能感兴趣的:(pig)