You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "ajantha-bhat (via GitHub)" <gi...@apache.org> on 2023/02/23 14:28:18 UTC

[GitHub] [iceberg] ajantha-bhat commented on a diff in pull request #6887: API: Replace special case of deprecated RuntimeIOException with FileHandlingException

ajantha-bhat commented on code in PR #6887:
URL: https://github.com/apache/iceberg/pull/6887#discussion_r1115773074


##########
core/src/main/java/org/apache/iceberg/avro/AvroIO.java:
##########
@@ -178,7 +179,7 @@ static long findStartingRowPos(Supplier<SeekableInputStream> open, long start) {
           SYNC_READER.read(decoder, blockSync);
 
           if (!Arrays.equals(fileSync, blockSync)) {
-            throw new RuntimeIOException("Invalid sync at %s", nextSyncPos);
+            throw new FileHandlingException("Invalid sync at %s", nextSyncPos);

Review Comment:
   Avro itself throws direct IOException for invalid sync cases as we can see here
   
   https://github.com/apache/avro/blob/5548c9dff7a3bd851eacc791b52b21804f9f8408/lang/java/avro/src/main/java/org/apache/avro/file/DataFileStream.java#L330-L332
   
   So, I too changed this now to use just IOException



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org