无法从loadFunc org.apache.pig.builtin.AvroStorage获取架构

时间:2014-10-22 15:58:48

标签: hadoop cloud apache-pig nosql

我在运行以下猪脚本时遇到以下错误

REGISTER /opt/cloudera/parcels/CDH/lib/pig/lib/avro.jar
REGISTER /opt/cloudera/parcels/CDH/lib/pig/lib/json-simple-1.1.jar
REGISTER /opt/cloudera/parcels/CDH/lib/pig/lib/jackson-core-asl-1.8.8.jar
REGISTER /opt/cloudera/parcels/CDH/lib/pig/lib/jackson-mapper-asl-1.8.8.jar
REGISTER /opt/cloudera/parcels/CDH/lib/pig/piggybank.jar
list_cookies = LOAD '/user/xyz/testbed/llama-2014-Oct-12d/abc'
    USING org.apache.pig.piggybank.storage.avro.AvroStorage();

出现以下错误

2014-10-22 11:51:14,705 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2245: Cannot get schema from loadFunc org.apache.pig.builtin.AvroStorage
Details at logfile: /home/xyz/pig_1413991623605.log

1 个答案:

答案 0 :(得分:2)

在我的情况下,只是输入文件夹不存在的事实。 Pig错误消息不合适,完全没有帮助。将输入文件夹更改为存在的文件夹后,此错误消失了。所以,在花费大量时间调试之前一定要检查一下!