adoroszlai commented on code in PR #4363:
URL: https://github.com/apache/ozone/pull/4363#discussion_r1130027139
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/GrpcContainerUploader.java:
##########
@@ -53,18 +55,32 @@ public GrpcContainerUploader(
public OutputStream startUpload(long containerId, DatanodeDetails target,
CompletableFuture<Void> callback, CopyContainerCompression compression)
throws IOException {
- GrpcReplicationClient client =
- new GrpcReplicationClient(target.getIpAddress(),
- target.getPort(Port.Name.REPLICATION).getValue(),
- securityConfig, certClient, compression);
- StreamObserver<SendContainerRequest> requestStream = client.upload(
- new SendContainerResponseStreamObserver(containerId, target,
callback));
- return new SendContainerOutputStream(requestStream, containerId,
- GrpcReplicationService.BUFFER_SIZE, compression);
+ GrpcReplicationClient client = null;
Review Comment:
Thanks for the idea. I prefer to keep `PushReplicator` independent of the
gRPC implementation, similar to `DownloadAndImportReplicator` (pull
replication). But I agree that passing around `client` just to close it is a
hack, created HDDS-8119 to get rid of it.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]