Abhishek Rawat has posted comments on this change. ( http://gerrit.cloudera.org:8080/21925 )
Change subject: IMPALA-11298: Allow users to share hs2 sessions from multiple hosts ...................................................................... Patch Set 2: (3 comments) http://gerrit.cloudera.org:8080/#/c/21925/2//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/21925/2//COMMIT_MSG@9 PS2, Line 9: hs2 sessions are not necessarily bound to a host but to a user. This > Is this something new or just a clarification of what we do already? I think this is mainly a clarification. hs2 sessions are associated with a user and session id/secret and in theory could be used from different hosts. Not many clients use multiple hosts, but in case of Hue it's possible to have multiple Hue hosts reusing same session. http://gerrit.cloudera.org:8080/#/c/21925/2/be/src/service/impala-hs2-server.cc File be/src/service/impala-hs2-server.cc: http://gerrit.cloudera.org:8080/#/c/21925/2/be/src/service/impala-hs2-server.cc@371 PS2, Line 371: state->connected_user_short = > Here I think we don't know that connected_user is a Kerberos user. So we ar Yeah that's correct this is mainly to cache the short user name in session's state and in case the 'connected_user' is not a kerberos principal, GetShortUsernameFromKerberosPrincipal() basically returns the 'connected_user'. I could add a comment to clarify that this will only be used if 'connected_user' is a kerberos principal. http://gerrit.cloudera.org:8080/#/c/21925/2/be/src/service/impala-server.h File be/src/service/impala-server.h: http://gerrit.cloudera.org:8080/#/c/21925/2/be/src/service/impala-server.h@1400 PS2, Line 1400: const string connected_user_short = : ThriftServer::GetThreadConnectionContext()->kerberos_user_short; : const string session_user_short = session_->connected_user_short; > So we set 'connected_user_short' is the user which is currently connected to this session i.e the connection which initiated this 'WithSession' call. 'session_user_short' is the user which was connected when session was created in OpenSession. -- To view, visit http://gerrit.cloudera.org:8080/21925 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib9c539cda8c760c8667a2e8cbb6d5c7902888de9 Gerrit-Change-Number: 21925 Gerrit-PatchSet: 2 Gerrit-Owner: Abhishek Rawat <[email protected]> Gerrit-Reviewer: Abhishek Rawat <[email protected]> Gerrit-Reviewer: Andrew Sherman <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Comment-Date: Mon, 14 Oct 2024 21:18:21 +0000 Gerrit-HasComments: Yes
