Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,10 @@ DataBlock nextRawBlock(DataBlock reuse) throws IOException {
vin.readFixed(syncBuffer);
availableBlock = false;
if (!Arrays.equals(syncBuffer, header.sync))
throw new IOException("Invalid sync!");
throw new IOException("Invalid sync marker! The sync marker in the data block doesn't match the "
+ "file header's sync marker. This likely indicates data corruption, truncated file, "
+ "or incorrectly concatenated Avro files. Verify file integrity and ensure proper "
+ "file transmission or creation.");
return reuse;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ void corruptedFile() throws IOException {
assertEquals("fig", r.next().toString());
assertFalse(r.hasNext());
} catch (AvroRuntimeException e) {
assertEquals("Invalid sync!", e.getCause().getMessage());
assertEquals("Invalid sync marker! The sync marker in the data block doesn't match the "
+ "file header's sync marker. This likely indicates data corruption, truncated file, "
+ "or incorrectly concatenated Avro files. Verify file integrity and ensure proper "
+ "file transmission or creation.", e.getCause().getMessage());
}

}
Expand Down