chamikaramj commented on a change in pull request #14817:
URL: https://github.com/apache/beam/pull/14817#discussion_r663208862



##########
File path: 
sdks/java/extensions/google-cloud-platform-core/src/main/java/org/apache/beam/sdk/extensions/gcp/util/GcsUtil.java
##########
@@ -107,6 +110,7 @@ public GcsUtil create(PipelineOptions options) {
           storageBuilder.getHttpRequestInitializer(),
           gcsOptions.getExecutorService(),
           hasExperiment(options, "use_grpc_for_gcs"),
+          gcsOptions.getGcpCredential(),

Review comment:
       This is not backwards compatible. What if gcpCredentials is not provided 
? (I assume default credentials will be used but we should make sure that this 
does not result in a regression).

##########
File path: 
sdks/java/extensions/google-cloud-platform-core/src/main/java/org/apache/beam/sdk/extensions/gcp/util/GcsUtil.java
##########
@@ -763,7 +751,7 @@ public void onSuccess(StorageObject response, HttpHeaders 
httpHeaders)
           @Override
           public void onFailure(GoogleJsonError e, HttpHeaders httpHeaders) 
throws IOException {
             IOException ioException;
-            if (errorExtractor.itemNotFound(e)) {
+            if (e.getCode() == HttpStatusCodes.STATUS_CODE_NOT_FOUND) {

Review comment:
       So this is a regression ? Note that Beam file IO connectors are very 
sensitives to changes in behavior of rename/copy/delete etc. since current 
behavior is carefully implemented (after many bugs) to be correct when there 
are step failures and retries.

##########
File path: 
sdks/java/extensions/google-cloud-platform-core/src/main/java/org/apache/beam/sdk/extensions/gcp/util/GcsUtil.java
##########
@@ -400,6 +402,22 @@ public SeekableByteChannel open(GcsPath path) throws 
IOException {
     return googleCloudStorage.open(new StorageResourceId(path.getBucket(), 
path.getObject()));
   }
 
+  /**
+   * Opens an object in GCS.
+   *
+   * <p>Returns a SeekableByteChannel that provides access to data in the 
bucket.
+   *
+   * @param path the GCS filename to read from
+   * @param readOptions Fine-grained options for behaviors of retries, 
buffering, etc.
+   * @return a SeekableByteChannel that can read the object data
+   */
+  @VisibleForTesting
+  SeekableByteChannel open(GcsPath path, GoogleCloudStorageReadOptions 
readOptions)

Review comment:
       Where is this used ?




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