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 <gleng...@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-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-commits-h...@hadoop.apache.org

Reply via email to