私はこれでどこが間違っているのか理解できないようです。このスクリプトは、PigStorage では問題なく機能しますが、CSVLoader では ClassCastException が発生します。
ドキュメントを確認しましたが、役に立ちませんでした。
スタック トレースは次のとおりです。
Pig Stack Trace
---------------
ERROR 1200: Pig script failed to parse:
<file pig_script.pig, line 15, column 0> pig script failed to validate: java.lang.ClassCastException: org.apache.pig.piggybank.storage.CSVLoader cannot be cast to org.apache.pig.StoreFuncInterface
org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: Error during parsing. Pig script failed to parse:
<file pig_script.pig, line 15, column 0> pig script failed to validate: java.lang.ClassCastException: org.apache.pig.piggybank.storage.CSVLoader cannot be cast to org.apache.pig.StoreFuncInterface
at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1597)
at org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1540)
at org.apache.pig.PigServer.registerQuery(PigServer.java:540)
at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:970)
at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:386)
at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:189)
at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:165)
at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:84)
at org.apache.pig.Main.run(Main.java:555)
at org.apache.pig.Main.main(Main.java:111)
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:601)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)