[ 
https://issues.apache.org/jira/browse/BEAM-8889?focusedWorklogId=620278&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-620278
 ]

ASF GitHub Bot logged work on BEAM-8889:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/Jul/21 23:31
            Start Date: 07/Jul/21 23:31
    Worklog Time Spent: 10m 
      Work Description: veblush commented on a change in pull request #14817:
URL: https://github.com/apache/beam/pull/14817#discussion_r665769781



##########
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:
       This is used for the test. Previously test access the implementation 
detail (e.g. `GoogleCloudStorageReadChannel`) in 
`testGCSChannelCloseIdempotent()` but it doesn't need to do it anymore with 
this function.




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


Issue Time Tracking
-------------------

            Worklog Id:     (was: 620278)
    Remaining Estimate: 125h 50m  (was: 126h)
            Time Spent: 42h 10m  (was: 42h)

> Make GcsUtil use GoogleCloudStorage
> -----------------------------------
>
>                 Key: BEAM-8889
>                 URL: https://issues.apache.org/jira/browse/BEAM-8889
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-java-gcp
>    Affects Versions: 2.16.0
>            Reporter: Esun Kim
>            Assignee: VASU NORI
>            Priority: P2
>              Labels: gcs
>             Fix For: 2.22.0
>
>   Original Estimate: 168h
>          Time Spent: 42h 10m
>  Remaining Estimate: 125h 50m
>
> [GcsUtil|https://github.com/apache/beam/blob/master/sdks/java/extensions/google-cloud-platform-core/src/main/java/org/apache/beam/sdk/extensions/gcp/util/GcsUtil.java]
>  is a primary class to access Google Cloud Storage on Apache Beam. Current 
> implementation directly creates GoogleCloudStorageReadChannel and 
> GoogleCloudStorageWriteChannel by itself to read and write GCS data rather 
> than using 
> [GoogleCloudStorage|https://github.com/GoogleCloudPlatform/bigdata-interop/blob/master/gcsio/src/main/java/com/google/cloud/hadoop/gcsio/GoogleCloudStorage.java]
>  which is an abstract class providing basic IO capability which eventually 
> creates channel objects. This request is about updating GcsUtil to use 
> GoogleCloudStorage to create read and write channel, which is expected 
> flexible because it can easily pick up the new change; e.g. new channel 
> implementation using new protocol without code change.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to