This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new c1b67d4a40 HDDS-11287. Code cleanup in XceiverClientSpi (#7043)
c1b67d4a40 is described below
commit c1b67d4a40f2d051e919d76fe3a6ebeef6c74493
Author: jianghuazhu <[email protected]>
AuthorDate: Wed Aug 7 22:22:36 2024 +0800
HDDS-11287. Code cleanup in XceiverClientSpi (#7043)
---
.../main/java/org/apache/hadoop/hdds/scm/XceiverClientGrpc.java | 9 +++------
.../main/java/org/apache/hadoop/hdds/scm/XceiverClientSpi.java | 6 ++----
2 files changed, 5 insertions(+), 10 deletions(-)
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 048eab95fa..5cd41edd38 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 @@ public class XceiverClientGrpc extends XceiverClientSpi {
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 =
@@ -321,7 +320,6 @@ public class XceiverClientGrpc extends XceiverClientSpi {
/**
* @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
@@ -346,8 +344,7 @@ public class XceiverClientGrpc extends XceiverClientSpi {
ContainerCommandRequestProto request, List<Validator> 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 71d309dee6..f6529e84bd 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 abstract class XceiverClientSpi implements Closeable
{
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 abstract class XceiverClientSpi implements Closeable
{
List<Validator> 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);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]