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 >> Map Reduce Jobs bound to "String" StringType


Copy link to this message
-
Map Reduce Jobs bound to "String" StringType
Hi,

am I right with saying: When using the Map Reduce new API, there are always
Java Strings created for avro string types?

I know about the "avro.string.type" property but even when leaving this
untouched, I get Strings.

In AvroRecordReaderBase there is a ReflectDatumReader instantiated

 mAvroFileReader = createAvroFileReader(seekableFileInput,

        new ReflectDatumReader<T>(mReaderSchema));
and in this this method is always called:
  @Override

  protected Object readString(Object old, Decoder in) throws IOException {

    return super.readString(null, in).toString();

  }
Is there a way to circumvent this and keep using Utf8?
Cheers,
Johannnes
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