Package org.apache.hadoop.security.token.SecretManager

Examples of org.apache.hadoop.security.token.SecretManager.InvalidToken


    @Override
    public long renewDelegationToken(Token<DelegationTokenIdentifier> t)
    throws InvalidToken, IOException {
      MyToken token = (MyToken)t;
      if(token.isCanceled()) {
        throw new InvalidToken("token has been canceled");
      }
      counter ++;
      this.token = (MyToken)token;
      System.out.println("Called MYDFS.renewdelegationtoken " + token);
      if(tokenToRenewIn2Sec == token) {
View Full Code Here


        context.getContainerTokenSecretManager().retrievePassword(
          containerTokenIdentifier);
    byte[] tokenPass = token.getPassword().array();
    if (password == null || tokenPass == null
        || !Arrays.equals(password, tokenPass)) {
      throw new InvalidToken(
        "Invalid container token used for starting container on : "
            + context.getNodeId().toString());
    }
    return containerTokenIdentifier;
  }
View Full Code Here

    @Override
    public long renew(Token<?> t, Configuration conf) throws IOException {
      MyToken token = (MyToken)t;
      if(token.isCanceled()) {
        throw new InvalidToken("token has been canceled");
      }
      lastRenewed = token;
      counter ++;
      LOG.info("Called MYDFS.renewdelegationtoken " + token +
          ";this dfs=" + this.hashCode() + ";c=" + counter);
View Full Code Here

  public static class BadTokenSecretManager extends TestTokenSecretManager {

    @Override
    public byte[] retrievePassword(TestTokenIdentifier id)
        throws InvalidToken {
      throw new InvalidToken(ERROR_MESSAGE);
    }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.security.token.SecretManager.InvalidToken

Copyright © 2018 www.massapicom. 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.