This is an automated email from the ASF dual-hosted git repository.

szetszwo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ratis.git


The following commit(s) were added to refs/heads/master by this push:
     new 36fa434  RATIS-414. Fix checkstyle warnings in RaftClient and 
RaftClientImpl.  Contributed by Dinesh Chitlangia
36fa434 is described below

commit 36fa43436906e818182935585d960cca2407e678
Author: Tsz Wo Nicholas Sze <[email protected]>
AuthorDate: Fri Jan 25 13:55:24 2019 -0800

    RATIS-414. Fix checkstyle warnings in RaftClient and RaftClientImpl.  
Contributed by Dinesh Chitlangia
---
 .../src/main/java/org/apache/ratis/client/RaftClient.java     |  4 ++--
 .../java/org/apache/ratis/client/impl/RaftClientImpl.java     | 11 ++++++-----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/ratis-client/src/main/java/org/apache/ratis/client/RaftClient.java 
b/ratis-client/src/main/java/org/apache/ratis/client/RaftClient.java
index ec72d8c..eeb28a7 100644
--- a/ratis-client/src/main/java/org/apache/ratis/client/RaftClient.java
+++ b/ratis-client/src/main/java/org/apache/ratis/client/RaftClient.java
@@ -140,8 +140,8 @@ public interface RaftClient extends Closeable {
     }
 
     /** Set servers. */
-    public Builder setRaftGroup(RaftGroup group) {
-      this.group = group;
+    public Builder setRaftGroup(RaftGroup grp) {
+      this.group = grp;
       return this;
     }
 
diff --git 
a/ratis-client/src/main/java/org/apache/ratis/client/impl/RaftClientImpl.java 
b/ratis-client/src/main/java/org/apache/ratis/client/impl/RaftClientImpl.java
index 58206bd..c14417d 100644
--- 
a/ratis-client/src/main/java/org/apache/ratis/client/impl/RaftClientImpl.java
+++ 
b/ratis-client/src/main/java/org/apache/ratis/client/impl/RaftClientImpl.java
@@ -42,10 +42,10 @@ import static 
org.apache.ratis.proto.RaftProtos.RaftClientRequestProto.TypeCase.
 
 /** A client who sends requests to a raft service. */
 final class RaftClientImpl implements RaftClient {
-  private static final AtomicLong callIdCounter = new AtomicLong();
+  private static final AtomicLong CALL_ID_COUNTER = new AtomicLong();
 
   private static long nextCallId() {
-    return callIdCounter.getAndIncrement() & Long.MAX_VALUE;
+    return CALL_ID_COUNTER.getAndIncrement() & Long.MAX_VALUE;
   }
 
   static class PendingAsyncRequest implements 
SlidingWindow.Request<RaftClientReply> {
@@ -244,12 +244,13 @@ final class RaftClientImpl implements RaftClient {
   }
 
   @Override
-  public RaftClientReply groupRemove(RaftGroupId groupId, boolean 
deleteDirectory, RaftPeerId server) throws IOException {
+  public RaftClientReply groupRemove(RaftGroupId grpId, boolean 
deleteDirectory, RaftPeerId server)
+      throws IOException {
     Objects.requireNonNull(groupId, "groupId == null");
     Objects.requireNonNull(server, "server == null");
 
     final long callId = nextCallId();
-    return sendRequest(GroupManagementRequest.newRemove(clientId, server, 
callId, groupId, deleteDirectory));
+    return sendRequest(GroupManagementRequest.newRemove(clientId, server, 
callId, grpId, deleteDirectory));
   }
 
   @Override
@@ -449,7 +450,7 @@ final class RaftClientImpl implements RaftClient {
   }
 
   long getCallId() {
-    return callIdCounter.get();
+    return CALL_ID_COUNTER.get();
   }
 
   @Override

Reply via email to