clairemcginty opened a new pull request, #16935:
URL: https://github.com/apache/iceberg/pull/16935
Tiny improvement to the error handling surrounding SnapshotScan. Sometimes I
end up in a state where my filesystem's retention policy has been improperly
set and the underlying manifest file has been removed; in that case my
SnapshotScan fails with the somewhat cryptic error:
```
java.lang.NullPointerException: Cannot invoke
"com.google.cloud.storage.Blob.getSize()" because the return value of
"org.apache.iceberg.gcp.gcs.GCSInputFile.getBlob()" is null
at
org.apache.iceberg.gcp.gcs.GCSInputFile.getLength(GCSInputFile.java:67)
at
org.apache.iceberg.avro.AvroIterable.newFileReader(AvroIterable.java:103)
at org.apache.iceberg.avro.AvroIterable.iterator(AvroIterable.java:78)
at org.apache.iceberg.avro.AvroIterable.iterator(AvroIterable.java:38)
at
org.apache.iceberg.relocated.com.google.common.collect.Iterables.addAll(Iterables.java:333)
at
org.apache.iceberg.relocated.com.google.common.collect.Lists.newLinkedList(Lists.java:251)
at org.apache.iceberg.ManifestLists.read(ManifestLists.java:43)
at org.apache.iceberg.BaseSnapshot.cacheManifests(BaseSnapshot.java:186)
at org.apache.iceberg.BaseSnapshot.dataManifests(BaseSnapshot.java:213)
at org.apache.iceberg.DataTableScan.doPlanFiles(DataTableScan.java:68)
at org.apache.iceberg.SnapshotScan.planFiles(SnapshotScan.java:162)
```
With this PR, the error message gains a bit more clarity:
```
org.apache.iceberg.exceptions.RuntimeIOException: java.io.IOException:
Failed to read manifest list: file <fs://path/to/my/file> does not exist
at org.apache.iceberg.ManifestLists.read(ManifestLists.java:37)
at org.apache.iceberg.BaseSnapshot.cacheManifests(BaseSnapshot.java:186)
at org.apache.iceberg.BaseSnapshot.dataManifests(BaseSnapshot.java:213)
at org.apache.iceberg.DataTableScan.doPlanFiles(DataTableScan.java:68)
at org.apache.iceberg.SnapshotScan.planFiles(SnapshotScan.java:162)
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]