clairemcginty commented on code in PR #32769:
URL: https://github.com/apache/beam/pull/32769#discussion_r1813224098


##########
sdks/java/extensions/google-cloud-platform-core/src/main/java/org/apache/beam/sdk/extensions/gcp/util/GcsUtil.java:
##########
@@ -249,17 +307,20 @@ public static boolean isWildcard(GcsPath spec) {
       Credentials credentials,
       @Nullable Integer uploadBufferSizeBytes,
       @Nullable Integer rewriteDataOpBatchLimit,
-      GcsCountersOptions gcsCountersOptions) {
+      GcsCountersOptions gcsCountersOptions,
+      GoogleCloudStorageReadOptions gcsReadOptions) {
     this.storageClient = storageClient;
     this.httpRequestInitializer = httpRequestInitializer;
     this.uploadBufferSizeBytes = uploadBufferSizeBytes;
     this.executorService = executorService;
     this.credentials = credentials;
     this.maxBytesRewrittenPerCall = null;
     this.numRewriteTokensUsed = null;
+    this.googleCloudStorageReadOptions = gcsReadOptions;
     googleCloudStorageOptions =
         GoogleCloudStorageOptions.builder()
             .setAppName("Beam")
+            .setReadChannelOptions(this.googleCloudStorageReadOptions)

Review Comment:
   yeah `GoogleCloudStorageImpl` set up in a slightly strange way -- it's 
constructed with a GoogleCloudStorageOptions arg but also accepts a separate 
GoogleCloudStorageOptions as an argument to `open`, while ignoring the former 
instance variable. Dropping the separate member variable here makes sense, will 
do 👍 



##########
sdks/java/extensions/google-cloud-platform-core/src/main/java/org/apache/beam/sdk/extensions/gcp/util/GcsUtil.java:
##########
@@ -249,17 +307,20 @@ public static boolean isWildcard(GcsPath spec) {
       Credentials credentials,
       @Nullable Integer uploadBufferSizeBytes,
       @Nullable Integer rewriteDataOpBatchLimit,
-      GcsCountersOptions gcsCountersOptions) {
+      GcsCountersOptions gcsCountersOptions,
+      GoogleCloudStorageReadOptions gcsReadOptions) {
     this.storageClient = storageClient;
     this.httpRequestInitializer = httpRequestInitializer;
     this.uploadBufferSizeBytes = uploadBufferSizeBytes;
     this.executorService = executorService;
     this.credentials = credentials;
     this.maxBytesRewrittenPerCall = null;
     this.numRewriteTokensUsed = null;
+    this.googleCloudStorageReadOptions = gcsReadOptions;
     googleCloudStorageOptions =
         GoogleCloudStorageOptions.builder()
             .setAppName("Beam")
+            .setReadChannelOptions(this.googleCloudStorageReadOptions)

Review Comment:
   yeah `GoogleCloudStorageImpl` is set up in a slightly strange way -- it's 
constructed with a GoogleCloudStorageOptions arg but also accepts a separate 
GoogleCloudStorageOptions as an argument to `open`, while ignoring the former 
instance variable. Dropping the separate member variable here makes sense, will 
do 👍 



-- 
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]

Reply via email to