[ https://issues.apache.org/jira/browse/AVRO-2061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16117124#comment-16117124 ]
Doug Cutting commented on AVRO-2061: ------------------------------------ This should be considered an incompatible change. While not a best practice, there may be applications that depend on the existing error message. Also, it might be better to call it an "Avro data file", rather than "object file". > Improve Invalid File Format Error Message > ----------------------------------------- > > Key: AVRO-2061 > URL: https://issues.apache.org/jira/browse/AVRO-2061 > Project: Avro > Issue Type: Improvement > Components: java > Affects Versions: 1.9.0, 1.8.2 > Reporter: BELUGA BEHR > Assignee: BELUGA BEHR > Priority: Trivial > Attachments: AVRO-2061.1.patch > > > {code:title=org.apache.avro.file.DataFileStream<D>} > try { > vin.readFixed(magic); // read magic > } catch (IOException e) { > throw new IOException("Not a data file.", e); > } > if (!Arrays.equals(DataFileConstants.MAGIC, magic)) > throw new IOException("Not a data file."); > {code} > Please consider improving the error message here. I just saw a MapReduce job > fail with an IOException with the message "Not a data file." There was > definitely data files in the input directory, however, they were not Avro > files. It would have been much more helpful if it told me that. -- This message was sent by Atlassian JIRA (v6.4.14#64029)