zhouyifan279 opened a new pull request #1173:
URL: https://github.com/apache/incubator-kyuubi/pull/1173


   ### _Why are the changes needed?_
   When communicating with NameNode HA, private tokens are created from 
original token:
   
![image](https://user-images.githubusercontent.com/88070094/135081188-5311d161-eb74-4be7-bd6f-b595c512f575.png)
   In above image, "ha-hdfs:mycluster" is the original token. 
"ha-hdfs://192.168.56.101:8020" and "ha-hdfs://192.168.56.102:8020" are private 
tokens.
   
   `KyuubiHadoopUtils.getCredentialsInternal` was supposed to extract these 
private tokens at Kyuubi server side and send them to SQL engine.
   
   But in fact, SQL engine side private tokens are automatically created when 
adding original token, 
    inside `org.apache.hadoop.security.Credentials#addToken`.
   
   ### _How was this patch tested?_
   - [ ] Add some test cases that check the changes thoroughly including 
negative and positive cases if possible
   
   - [x] Add screenshots for manual tests if appropriate
   SequenceNumber of private tokens always equal to original token:
   
![image](https://user-images.githubusercontent.com/88070094/135083412-5e5f3821-b4bc-4b20-a702-e2455c60044e.png)
   
![image](https://user-images.githubusercontent.com/88070094/135083421-654a0e62-9f85-47a0-b136-ee6ad7c32a05.png)
   
   - [x] [Run 
test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests)
 locally before make a pull request
   


-- 
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]


Reply via email to