Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig >> mail # user >> Generating Avro files for unit tests


Copy link to this message
-
Generating Avro files for unit tests
Hi All,

I am trying to generate input files using Java. I have raw data in a CSV
file, which Java reads and then uses GenericDatum/Record to create Avro
files. The avro file is valid as it is parsed properly by avrocat.

 But, I get this error when I try to load it in Pig grunt :

DEFINE AVRO_STORAGE org.apache.pig.piggybank.storage.avro.AvroStorage();

logdata = LOAD
'/Users/xxxx/Documents/workspace/DP-1147/apache-traffic-export/target/test-classes/output.avro'
USING AVRO_STORAGE();

2013-01-25 16:25:06,067 [main] ERROR org.apache.pig.tools.grunt.Grunt -
ERROR 1200: Pig script failed to parse:
<line 4, column 10> pig script failed to validate:
java.lang.RuntimeException: could not instantiate
'org.apache.pig.piggybank.storage.avro.AvroStorage' with arguments 'null'
Details at logfile: /Users/xxxx/pig_1359157245908.log
What should I be using instead?

- Meg
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB