Apache9 commented on a change in pull request #884: HBASE-23347 Allowable 
custom authentication methods for RPCs
URL: https://github.com/apache/hbase/pull/884#discussion_r356927459
 
 

 ##########
 File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcConnection.java
 ##########
 @@ -216,16 +152,16 @@ public void run(Timeout timeout) throws Exception {
     System.arraycopy(HConstants.RPC_HEADER, 0, preamble, 0, rpcHeaderLen);
     preamble[rpcHeaderLen] = HConstants.RPC_CURRENT_VERSION;
     synchronized (this) {
-      preamble[rpcHeaderLen + 1] = authMethod.code;
+      preamble[rpcHeaderLen + 1] = provider.getSaslAuthMethod().getCode();
     }
     return preamble;
   }
 
   protected ConnectionHeader getConnectionHeader() {
-    ConnectionHeader.Builder builder = ConnectionHeader.newBuilder();
+    final ConnectionHeader.Builder builder = ConnectionHeader.newBuilder();
     builder.setServiceName(remoteId.getServiceName());
-    UserInformation userInfoPB;
-    if ((userInfoPB = getUserInfo(remoteId.ticket.getUGI())) != null) {
+    final UserInformation userInfoPB  = 
provider.getUserInfo(remoteId.ticket.getUGI());
 
 Review comment:
   OK, here we just use remoteId.ticket.getUGI, dumb question, what is the 
difference after calling unwrapUGI?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to