I was attempting to use the LdapGroupsMapping code and the JavaKeyStoreProvider at the same time, and hit a really interesting, yet fatal, issue. The code goes into what ought to have been an infinite loop, were it not for it overflowing the stack and Java ending the loop. Here is a snippet of the stack; my annotations are at the bottom.
Here's my annotation, going from bottom to top.
- Somehow we enter Path.getFileSystem()
- This goes to FileSystem cache stuff, and then it wants the current user
- So we get to UserGroupInformation.getCurrentUser(), which as you can imagine gets to
- getUserToGroupsMappingService and thence to LdapGroupsMapping.setConf().
- That code gets the needed passwords, and we're using the CredentialProvider, so unsurprisingly we get to
- getPasswordFromCredentialProviders() - which chooses the JavaKeyStoreProvider like I told it to.
- The JavaKeyStoreProvider, in its constructor, does "fs = path.getFileSystem(conf);"
- And guess what, we're back in Path.getFileSystem, where we started at the beginning.
Please let me know if I've somehow configured something incorrectly, but if I have I can't figure out what it is...