g3rg0 opened a new pull request, #6677: URL: https://github.com/apache/hive/pull/6677
### What changes were proposed in this pull request? - Introduce ClusterNotReadyException (extends IOException) thrown by ZkRegistryBase.ensureInstancesCache() when PathChildrenCache fails to start due to InvalidACLException - Catch ClusterNotReadyException in ProactiveEviction.evict() and log at DEBUG level instead of propagating as RuntimeException - Add tests in TestLlapZookeeperRegistryImpl for the retry logic and the exception path - Add TestProactiveEviction verifying end-to-end behavior with an embedded ZooKeeper in a simulated Kerberos environment ### Why are the changes needed? In Kerberos-enabled deployments, HS2 connects to ZooKeeper without SASL authentication (it only needs read access to discover LLAP daemons). When no LLAP daemons have started, the ZK paths (e.g. /llap-sasl/user-hive) don't exist yet. The PathChildrenCache attempts to create them with CREATOR_ALL_ACL, which ZooKeeper rejects with InvalidACLException since the client has no authenticated identity. This surfaced as an unhandled RuntimeException from ProactiveEviction.evict(), causing DDL operations like DROP DATABASE to fail when LLAP hadn't started. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? - [x] TestProactiveEviction#testEvictWithKerberosWithoutComputeInstances — verifies evict() does not throw when no daemons are registered (the fix) - [x] TestProactiveEviction#testEvictWithKerberosAndRegisteredComputes — verifies evict() discovers registered instances and submits eviction tasks - [x] TestLlapZookeeperRegistryImpl#testRetryOnInvalidACLException — verifies retry logic on transient InvalidACLException - [x] TestLlapZookeeperRegistryImpl#testClusterNotReadyExceptionIsThrownWhenZkNodeNotExists — verifies ClusterNotReadyException is thrown when timeout is exhausted - [x] TDD verification: commenting out the catch clause causes the test to fail with RuntimeException: ClusterNotReadyException: InvalidACLException -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
