Package org.apache.hadoop.lib.service

Examples of org.apache.hadoop.lib.service.DelegationTokenManager.cancelToken()


    DelegationTokenManager tm = server.get(DelegationTokenManager.class);
    Token token = tm.createToken(UserGroupInformation.getCurrentUser(), "foo");
    Assert.assertNotNull(token);
    tm.verifyToken(token);
    Assert.assertTrue(tm.renewToken(token, "foo") > System.currentTimeMillis());
    tm.cancelToken(token, "foo");
    try {
      tm.verifyToken(token);
      Assert.fail();
    } catch (DelegationTokenManagerException ex) {
      //NOP
View Full Code Here


                } else {
                  if (dtOp == DelegationTokenOperation.CANCELDELEGATIONTOKEN) {
                    Token<DelegationTokenIdentifier> dt =
                      new Token<DelegationTokenIdentifier>();
                    dt.decodeFromUrlString(tokenParam);
                    tokenManager.cancelToken(dt,
                      UserGroupInformation.getCurrentUser().getUserName());
                  } else {
                    Token<DelegationTokenIdentifier> dt =
                      new Token<DelegationTokenIdentifier>();
                    dt.decodeFromUrlString(tokenParam);
View Full Code Here

    DelegationTokenManager tm = server.get(DelegationTokenManager.class);
    Token token = tm.createToken(UserGroupInformation.getCurrentUser(), "foo");
    Assert.assertNotNull(token);
    tm.verifyToken(token);
    Assert.assertTrue(tm.renewToken(token, "foo") > System.currentTimeMillis());
    tm.cancelToken(token, "foo");
    try {
      tm.verifyToken(token);
      Assert.fail();
    } catch (DelegationTokenManagerException ex) {
      //NOP
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.