Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Avro >> mail # user >> Error when trying to convert a local datafile to plain text with Avro Tools


Copy link to this message
-
Re: Error when trying to convert a local datafile to plain text with Avro Tools
Have you looked into the code for the toText Java?
We construct the Schema.Parser().parse method as follows

if (!fileReader.getSchema().equals(new
Schema.Parser().parse(TEXT_FILE_SCHEMA))) {

TEXT_FILE_SCHEMA has a static value of

private static final String TEXT_FILE_SCHEMA =
        "\"bytes\"";

We can therefore conclude that your Avro data has a Schema which does not
match this... therefore benehviour is correct.
Are you able to try doing fileReader.getSchema() to see what thre Schema is
like?
hth
Lewis
On Mon, Jul 14, 2014 at 1:22 AM, julianpeeters <[EMAIL PROTECTED]>
wrote:
*Lewis*