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
Avro >> mail # user >> avro_value_t or avro_datum_t


Copy link to this message
-
avro_value_t or avro_datum_t
To best of my knowledge use of avro_datum_t is discouraged. So I was trying
following code

//Assume path variable to be having proper value and proper exception
handling in place

PART A:
avro_value_t data;
avro_file_reader_t fileReader;

result = avro_file_reader(path, &fileReader);
result = avro_file_reader_read_value(fileReader, &data);

This above call leads to "segmentation fault"

PART B:
 avro_datum_t d_data;
 avro_file_reader_t fileReader;
 result = avro_file_reader(path, &fileReader);
 result = avro_file_reader_read(fileReader, NULL, &d_data);
 avro_datum_as_value(&data, d_data);

This works absolutely fine.
Am I missing anything in part A?
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