Github user dbahir commented on the issue:
https://github.com/apache/phoenix/pull/191
This solution is not thread safe and will not allow to safely create
multiple instances of a driver on different threads in the JVM.
This area should be protected,
https://github.com/joshelser/phoenix/blob/d17a8d855dc4a2c8cff578dd26e14c6c2c13cc3a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriver.java#L351.
With that said I am not sure that you can support multiple users and
support renewals with the way the UGI works.
If in the same JVM a driver is instantiated for User A and then another
driver is instantiated for User B the last call to loginUserFromKeytab will set
the the user information in the UGI.
loginUserFromKeytabAndReturnUGI can be used which will preserve the
original user info in the UGI but I think will not work correctly with renewing.
Do we want the Phoenix driver to allow multiple instances instantiated with
a different logged in user for each in the same JVM ?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---