You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by bh...@apache.org on 2020/10/14 21:32:09 UTC
[hadoop-ozone] branch master updated: HDDS-3995. Fix s3g met NPE
exception while write file by multiPartUpload (#1499)
This is an automated email from the ASF dual-hosted git repository.
bharat pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 814428e HDDS-3995. Fix s3g met NPE exception while write file by multiPartUpload (#1499)
814428e is described below
commit 814428e85f60dd7b1c5604b96713e17d828efb52
Author: GlenGeng <gl...@tencent.com>
AuthorDate: Thu Oct 15 05:31:56 2020 +0800
HDDS-3995. Fix s3g met NPE exception while write file by multiPartUpload (#1499)
---
.../java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java b/hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java
index a31986e..527f774 100644
--- a/hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java
+++ b/hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java
@@ -598,9 +598,12 @@ public class ObjectEndpoint extends EndpointBase {
IOUtils.copy(body, ozoneOutputStream);
}
} finally {
- IOUtils.closeQuietly(ozoneOutputStream);
+ if (ozoneOutputStream != null) {
+ ozoneOutputStream.close();
+ }
}
+ assert ozoneOutputStream != null;
OmMultipartCommitUploadPartInfo omMultipartCommitUploadPartInfo =
ozoneOutputStream.getCommitUploadPartInfo();
String eTag = omMultipartCommitUploadPartInfo.getPartName();
---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-commits-help@hadoop.apache.org