You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by el...@apache.org on 2021/02/24 08:46:06 UTC
[ozone] 17/27: fix closing
This is an automated email from the ASF dual-hosted git repository.
elek pushed a commit to branch HDDS-3816-ec
in repository https://gitbox.apache.org/repos/asf/ozone.git
commit f5e1fcadcc9d857c11cf3cd865eed3d87854346e
Author: Elek Márton <el...@apache.org>
AuthorDate: Wed Feb 3 13:25:12 2021 +0100
fix closing
---
.../hadoop/ozone/container/replication/GrpcReplicationService.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/GrpcReplicationService.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/GrpcReplicationService.java
index 60897a5..00bf844 100644
--- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/GrpcReplicationService.java
+++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/GrpcReplicationService.java
@@ -50,9 +50,8 @@ public class GrpcReplicationService extends
StreamObserver<CopyContainerResponseProto> responseObserver) {
long containerID = request.getContainerID();
LOG.info("Streaming container data ({}) to other datanode", containerID);
- try {
- GrpcOutputStream outputStream =
- new GrpcOutputStream(responseObserver, containerID, BUFFER_SIZE);
+ try (GrpcOutputStream outputStream =
+ new GrpcOutputStream(responseObserver, containerID, BUFFER_SIZE)) {
source.copyData(containerID, outputStream);
} catch (IOException e) {
LOG.error("Error streaming container {}", containerID, e);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ozone.apache.org
For additional commands, e-mail: commits-help@ozone.apache.org