Package org.apache.hadoop.lib.service

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


      Arrays.asList(DelegationTokenManagerService.class.getName())));
    HttpFSServerWebApp server = new HttpFSServerWebApp(dir, dir, dir, dir, conf);
    server.setAuthority(new InetSocketAddress(InetAddress.getLocalHost(), 14000));
    server.init();
    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 {
View Full Code Here


                String renewerParam =
                  request.getParameter(HttpFSKerberosAuthenticator.RENEWER_PARAM);
                if (renewerParam == null) {
                  renewerParam = token.getUserName();
                }
                Token<?> dToken = tokenManager.createToken(
                  UserGroupInformation.getCurrentUser(), renewerParam);
                map = delegationTokenToJSON(dToken);
                break;
              case RENEWDELEGATIONTOKEN:
              case CANCELDELEGATIONTOKEN:
View Full Code Here

      Arrays.asList(DelegationTokenManagerService.class.getName())));
    HttpFSServerWebApp server = new HttpFSServerWebApp(dir, dir, dir, dir, conf);
    server.setAuthority(new InetSocketAddress(InetAddress.getLocalHost(), 14000));
    server.init();
    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 {
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.