nastra commented on code in PR #14333:
URL: https://github.com/apache/iceberg/pull/14333#discussion_r2567587865
##########
gcp/src/main/java/org/apache/iceberg/gcp/gcs/GCSInputFile.java:
##########
@@ -64,6 +78,33 @@ public long getLength() {
@Override
public SeekableInputStream newStream() {
+ if (gcpProperties().isGcsAnalyticsCoreEnabled()) {
+ try {
+ GcsFileInfo fileInfo = getGcsFileInfo();
+ return new GoogleCloudStorageInputStreamWrapper(
+ GoogleCloudStorageInputStream.create(gcsFileSystem(), fileInfo));
+ } catch (IOException e) {
+ LOG.error("Failed to create GCS analytics core input stream.", e);
+ throw new RuntimeIOException(
+ e, "Failed to create GCS analytics core input stream for: %s",
blobId().toGsUtilUri());
+ }
+ }
+
return new GCSInputStream(storage(), blobId(), blobSize, gcpProperties(),
metrics());
}
+
+ GcsFileInfo getGcsFileInfo() {
Review Comment:
```suggestion
private GcsFileInfo gcsFileInfo() {
```
--
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]