diff --git a/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientGrpc.java b/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientGrpc.java index c46805654779..e22b47d7ce20 100644 --- a/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientGrpc.java +++ b/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientGrpc.java @@ -174,10 +174,9 @@ private synchronized void connectToDatanode(DatanodeDetails dn) OzoneConfigKeys.HDDS_CONTAINER_IPC_PORT_DEFAULT); } - // Add credential context to the client call if (LOG.isDebugEnabled()) { - LOG.debug("Nodes in pipeline : {}", pipeline.getNodes()); - LOG.debug("Connecting to server : {}", dn.getIpAddress()); + LOG.debug("Connecting to server : {}; nodes in pipeline : {}, ", + dn, pipeline.getNodes()); } ManagedChannel channel = createChannel(dn, port).build(); XceiverClientProtocolServiceStub asyncStub = @@ -320,7 +319,6 @@ public ContainerCommandResponseProto sendCommand( /** * @param request * @param dn - * @param pipeline * In case of getBlock for EC keys, it is required to set replicaIndex for * every request with the replicaIndex for that DN for which the request is * sent to. This method unpacks proto and reconstructs request after setting @@ -345,8 +343,7 @@ public ContainerCommandResponseProto sendCommand( ContainerCommandRequestProto request, List validators) throws IOException { try { - XceiverClientReply reply; - reply = sendCommandWithTraceIDAndRetry(request, validators); + XceiverClientReply reply = sendCommandWithTraceIDAndRetry(request, validators); return reply.getResponse().get(); } catch (ExecutionException e) { throw getIOExceptionForSendCommand(request, e); diff --git a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientSpi.java b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientSpi.java index 71d309dee6b3..f6529e84bdc1 100644 --- a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientSpi.java +++ b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientSpi.java @@ -110,8 +110,7 @@ public int getRefcount() { public ContainerCommandResponseProto sendCommand( ContainerCommandRequestProto request) throws IOException { try { - XceiverClientReply reply; - reply = sendCommandAsync(request); + XceiverClientReply reply = sendCommandAsync(request); return reply.getResponse().get(); } catch (InterruptedException e) { // Re-interrupt the thread while catching InterruptedException @@ -134,8 +133,7 @@ public ContainerCommandResponseProto sendCommand( List validators) throws IOException { try { - XceiverClientReply reply; - reply = sendCommandAsync(request); + XceiverClientReply reply = sendCommandAsync(request); ContainerCommandResponseProto responseProto = reply.getResponse().get(); for (Validator function : validators) { function.accept(request, responseProto);