[ 
https://issues.apache.org/jira/browse/AVRO-2487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16975647#comment-16975647
 ] 

Zezeng Wang commented on AVRO-2487:
-----------------------------------

I think this may be a non-issue.
Can you reproduce this question?[~Henry Wu]

> Bytes are serialized to empty string with DataFileWriter
> --------------------------------------------------------
>
>                 Key: AVRO-2487
>                 URL: https://issues.apache.org/jira/browse/AVRO-2487
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.7.7, 1.8.0, 1.8.1, 1.9.0, 1.8.2
>            Reporter: 富恒
>            Priority: Major
>
> bytes fields are serialized to empty string with DataFileWriter.
>  
> schema:
> {
>  "name": "files",
>  "type":
> { "type": "map", "values": "bytes" }
> }
> or 
> { "name": "data", "type": "bytes" }
>  
> code:
> DatumWriter<User> userDatumWriter = new SpecificDatumWriter<>(User.class);
>  DataFileWriter<User> dataFileWriter = new DataFileWriter<>(userDatumWriter);
>  dataFileWriter.setFlushOnEveryBlock(true);
>  dataFileWriter.setSyncInterval(32);
>  dataFileWriter.create(user1.getSchema(), new File(backupFolder + 
> File.separator + ".users.avro"));
>  dataFileWriter.append(user1);
>  dataFileWriter.close();



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to