veblush commented on a change in pull request #14817:
URL: https://github.com/apache/beam/pull/14817#discussion_r662526265
##########
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:
This is not possible anymore because ApiErrorExtrator doesn't support
GoogleJsonError anymore by
https://github.com/GoogleCloudDataproc/hadoop-connectors/pull/327. I copied the
same routine from the old ApiErrorExtrator to do the same thing.
##########
File path:
sdks/java/extensions/google-cloud-platform-core/src/test/java/org/apache/beam/sdk/extensions/gcp/util/GcsUtilTest.java
##########
@@ -772,7 +773,11 @@ public void testGCSChannelCloseIdempotent() throws
IOException {
GoogleCloudStorageReadOptions.builder().setFastFailOnNotFound(false).build();
SeekableByteChannel channel =
new GoogleCloudStorageReadChannel(
- null, "dummybucket", "dummyobject", null, new
ClientRequestHelper<>(), readOptions);
+ null,
+ new StorageResourceId("dummybucket", "dummyobject"),
Review comment:
done!
##########
File path:
sdks/java/extensions/google-cloud-platform-core/src/test/java/org/apache/beam/sdk/extensions/gcp/util/GcsUtilTest.java
##########
@@ -772,7 +773,11 @@ public void testGCSChannelCloseIdempotent() throws
IOException {
GoogleCloudStorageReadOptions.builder().setFastFailOnNotFound(false).build();
SeekableByteChannel channel =
new GoogleCloudStorageReadChannel(
Review comment:
good point. done.
--
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]