org.apache.hadoop.security.token.TokenRenewer Java Examples

The following examples show how to use org.apache.hadoop.security.token.TokenRenewer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EsTokenIdentifierTest.java    From elasticsearch-hadoop with Apache License 2.0 5 votes vote down vote up
@Test
public void testSPI() {
    ServiceLoader<TokenRenewer> tokenRenewers = ServiceLoader.load(TokenRenewer.class);
    for (TokenRenewer tokenRenewer : tokenRenewers) {
        if (tokenRenewer.handleKind(EsTokenIdentifier.KIND_NAME)) {
            return;
        }
    }
    Assert.fail("Could not find token renewer for " + EsTokenIdentifier.KIND_NAME);
}