Examples of selectToken()


Examples of org.apache.hadoop.hive.thrift.DelegationTokenSelector.selectToken()

  @Override
  public String getTokenStrForm(String tokenSignature) throws IOException {
    UserGroupInformation ugi = UserGroupInformation.getCurrentUser();
    TokenSelector<? extends TokenIdentifier> tokenSelector = new DelegationTokenSelector();

    Token<? extends TokenIdentifier> token = tokenSelector.selectToken(
        tokenSignature == null ? new Text() : new Text(tokenSignature), ugi.getTokens());
    return token != null ? token.encodeToUrlString() : null;
  }

  @Override
View Full Code Here

Examples of org.apache.hadoop.hive.thrift.DelegationTokenSelector.selectToken()

  @Override
  public String getTokenStrForm(String tokenSignature) throws IOException {
    UserGroupInformation ugi = UserGroupInformation.getCurrentUser();
    TokenSelector<? extends TokenIdentifier> tokenSelector = new DelegationTokenSelector();

    Token<? extends TokenIdentifier> token = tokenSelector.selectToken(
        tokenSignature == null ? new Text() : new Text(tokenSignature), ugi.getTokens());
    return token != null ? token.encodeToUrlString() : null;
  }

  /**
 
View Full Code Here

Examples of org.apache.hadoop.hive.thrift.DelegationTokenSelector.selectToken()

  @Override
  public String getTokenStrForm(String tokenSignature) throws IOException {
    UserGroupInformation ugi = UserGroupInformation.getCurrentUser();
    TokenSelector<? extends TokenIdentifier> tokenSelector = new DelegationTokenSelector();

    Token<? extends TokenIdentifier> token = tokenSelector.selectToken(
        tokenSignature == null ? new Text() : new Text(tokenSignature), ugi.getTokens());
    return token != null ? token.encodeToUrlString() : null;
  }

  /**
 
View Full Code Here

Examples of org.apache.hadoop.hive.thrift.DelegationTokenSelector.selectToken()

  @Override
  public String getTokenStrForm(String tokenSignature) throws IOException {
    UserGroupInformation ugi = UserGroupInformation.getCurrentUser();
    TokenSelector<? extends TokenIdentifier> tokenSelector = new DelegationTokenSelector();

    Token<? extends TokenIdentifier> token = tokenSelector.selectToken(
        tokenSignature == null ? new Text() : new Text(tokenSignature), ugi.getTokens());
    return token != null ? token.encodeToUrlString() : null;
  }

  @Override
View Full Code Here

Examples of org.apache.hadoop.hive.thrift.DelegationTokenSelector.selectToken()

      TokenSelector<? extends TokenIdentifier> hiveTokenSelector = new DelegationTokenSelector();
      //Oozie does not change the service field of the token
      //hence by default token generation will have a value of "new Text("")"
      //HiveClient will look for a use TokenSelector.selectToken() with service
      //set to empty "Text" if hive.metastore.token.signature property is set to null
      Token<? extends TokenIdentifier> hiveToken = hiveTokenSelector.selectToken(
        new Text(), ugi.getTokens());
      if (hiveToken == null) {
        // we did not get token set up by oozie, let's get them ourselves here.
        // we essentially get a token per unique Output HCatTableInfo - this is
        // done because through Pig, setOutput() method is called multiple times
View Full Code Here

Examples of org.apache.hadoop.hive.thrift.DelegationTokenSelector.selectToken()

      TokenSelector<? extends TokenIdentifier> hiveTokenSelector = new DelegationTokenSelector();
      //Oozie does not change the service field of the token
      //hence by default token generation will have a value of "new Text("")"
      //HiveClient will look for a use TokenSelector.selectToken() with service
      //set to empty "Text" if hive.metastore.token.signature property is set to null
      Token<? extends TokenIdentifier> hiveToken = hiveTokenSelector.selectToken(
        new Text(), ugi.getTokens());
      if (hiveToken == null) {
        // we did not get token set up by oozie, let's get them ourselves here.
        // we essentially get a token per unique Output HCatTableInfo - this is
        // done because through Pig, setOutput() method is called multiple times
View Full Code Here

Examples of org.apache.hadoop.hive.thrift.DelegationTokenSelector.selectToken()

  @Override
  public String getTokenStrForm(String tokenSignature) throws IOException {
    UserGroupInformation ugi = UserGroupInformation.getCurrentUser();
    TokenSelector<? extends TokenIdentifier> tokenSelector = new DelegationTokenSelector();

    Token<? extends TokenIdentifier> token = tokenSelector.selectToken(
        tokenSignature == null ? new Text() : new Text(tokenSignature), ugi.getTokens());
    return token != null ? token.encodeToUrlString() : null;
  }

  @Override
View Full Code Here

Examples of org.apache.hadoop.hive.thrift.DelegationTokenSelector.selectToken()

  @Override
  public String getTokenStrForm(String tokenSignature) throws IOException {
    UserGroupInformation ugi = UserGroupInformation.getCurrentUser();
    TokenSelector<? extends TokenIdentifier> tokenSelector = new DelegationTokenSelector();

    Token<? extends TokenIdentifier> token = tokenSelector.selectToken(
        tokenSignature == null ? new Text() : new Text(tokenSignature), ugi.getTokens());
    return token != null ? token.encodeToUrlString() : null;
  }
}
View Full Code Here

Examples of org.apache.hadoop.hive.thrift.DelegationTokenSelector23.selectToken()

  @Override
  public String getTokenStrForm(String tokenSignature) throws IOException {
    UserGroupInformation ugi = UserGroupInformation.getCurrentUser();
    TokenSelector<? extends TokenIdentifier> tokenSelector = new DelegationTokenSelector23();

    Token<? extends TokenIdentifier> token = tokenSelector.selectToken(
        tokenSignature == null ? new Text() : new Text(tokenSignature), ugi.getTokens());
    return token != null ? token.encodeToUrlString() : null;
  }
 
  @Override
View Full Code Here

Examples of org.apache.hadoop.yarn.security.client.ClientToAMTokenSelector.selectToken()

    if (UserGroupInformation.isSecurityEnabled()) {

      ClientToAMTokenSelector clientToAMTokenSelector =
          new ClientToAMTokenSelector();
      this.clientToAMToken =
          clientToAMTokenSelector.selectToken(new Text(),
            appAttemptTokens.getAllTokens());
    }

    // Only one AMRMToken is stored per-attempt, so this should be fine. Can't
    // use TokenSelector as service may change - think fail-over.
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.