Examples of cancelDelegationToken()


Examples of org.apache.hadoop.hive.metastore.HiveMetaStoreClient.cancelDelegationToken()

            // In the latter case the HCAT_KEY_TOKEN_SIGNATURE property in
            // the conf will not be set
            String tokenStrForm = client.getTokenStrForm();
            if(tokenStrForm != null && jobContext.getConfiguration().get
                    (HCatConstants.HCAT_KEY_TOKEN_SIGNATURE) != null) {
                client.cancelDelegationToken(tokenStrForm);
            }

            if (harProcessor.isEnabled()) {
                String jcTokenStrForm = jobContext.getConfiguration().get(HCatConstants.HCAT_KEY_JOBCLIENT_TOKEN_STRFORM);
                String jcTokenSignature = jobContext.getConfiguration().get(HCatConstants.HCAT_KEY_JOBCLIENT_TOKEN_SIGNATURE);
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.HiveMetaStoreClient.cancelDelegationToken()

            // we are done - we should cancel if the tokens were acquired by
            // HCatOutputFormat and not if they were supplied by Oozie. In the latter
            // case the HCAT_KEY_TOKEN_SIGNATURE property in the conf will not be set
            String tokenStrForm = client.getTokenStrForm();
            if(tokenStrForm != null && context.getConfiguration().get(HCatConstants.HCAT_KEY_TOKEN_SIGNATURE) != null) {
              client.cancelDelegationToken(tokenStrForm);
            }
            if(harProcessor.isEnabled()) {
                String jcTokenStrForm =
                  context.getConfiguration().get(HCatConstants.HCAT_KEY_JOBCLIENT_TOKEN_STRFORM);
                String jcTokenSignature =
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.HiveMetaStoreClient.cancelDelegationToken()

      // the conf will not be set
      String tokenStrForm = client.getTokenStrForm();
      if (tokenStrForm != null
          && context.getConfiguration().get(
              HCatConstants.HCAT_KEY_TOKEN_SIGNATURE) != null) {
        client.cancelDelegationToken(tokenStrForm);
      }
    } catch (MetaException e) {
      LOG.warn("MetaException while cancelling delegation token.", e);
    } catch (TException e) {
      LOG.warn("TException while cancelling delegation token.", e);
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.HiveMetaStoreClient.cancelDelegationToken()

      // the conf will not be set
      String tokenStrForm = client.getTokenStrForm();
      if (tokenStrForm != null
          && context.getConfiguration().get(
              HCatConstants.HCAT_KEY_TOKEN_SIGNATURE) != null) {
        client.cancelDelegationToken(tokenStrForm);
      }
    } catch (MetaException e) {
      LOG.warn("MetaException while cancelling delegation token.", e);
    } catch (TException e) {
      LOG.warn("TException while cancelling delegation token.", e);
View Full Code Here

Examples of org.apache.hadoop.mapred.JobClient.cancelDelegationToken()

//    LOG.info("cancelJobTrackerDelegationToken("+tokenStrForm+","+tokenSignature+")");
    JobClient jcl = new JobClient(new JobConf(new Configuration(), HCatOutputFormat.class));
    Token<org.apache.hadoop.mapreduce.security.token.delegation.DelegationTokenIdentifier> t = extractJobTrackerToken(tokenStrForm,tokenSignature);
//    LOG.info("canceling "+t);
    try {
      jcl.cancelDelegationToken(t);
    }catch(Exception e){
//      HCatUtil.logToken(LOG, "jcl token to cancel", t);
      // ignore if token has already been invalidated.
    }
  }
View Full Code Here

Examples of org.apache.hadoop.mapred.JobClient.cancelDelegationToken()

      Assert.fail("bob renew");
    } catch (AccessControlException ace) {
      // PASS
    }
    try {
      bobClient.cancelDelegationToken(token);
      Assert.fail("bob renew");
    } catch (AccessControlException ace) {
      // PASS
    }
    client.cancelDelegationToken(token);
View Full Code Here

Examples of org.apache.hadoop.mapred.JobClient.cancelDelegationToken()

                HCatOutputFormat.class));
        Token<org.apache.hadoop.mapreduce.security.token.delegation.DelegationTokenIdentifier> t = extractJobTrackerToken(
                tokenStrForm, tokenSignature);
        // LOG.info("canceling "+t);
        try {
            jcl.cancelDelegationToken(t);
        } catch (Exception e) {
            // HCatUtil.logToken(LOG, "jcl token to cancel", t);
            // ignore if token has already been invalidated.
        }
    }
View Full Code Here

Examples of org.apache.hadoop.mapred.JobTracker.cancelDelegationToken()

      public Object run() throws Exception {
        try {
          Token<DelegationTokenIdentifier> token = jt
              .getDelegationToken(new Text(ugi.getShortUserName()));
          jt.renewDelegationToken(token);
          jt.cancelDelegationToken(token);
        } catch (IOException e) {
          e.printStackTrace();
          throw e;
        }
        return null;
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.MRClientProtocol.cancelDelegationToken()

        SecurityUtil.getTokenServiceAddr(token));
    try {
      CancelDelegationTokenRequest request = Records
          .newRecord(CancelDelegationTokenRequest.class);
      request.setDelegationToken(dToken);
      histProxy.cancelDelegationToken(request);
    } finally {
      stopHistoryProxy(histProxy);
    }
  }
View Full Code Here

Examples of org.apache.hadoop.yarn.api.ApplicationClientProtocol.cancelDelegationToken()

      if (rmClient != null) {
        try {
          CancelDelegationTokenRequest request =
              Records.newRecord(CancelDelegationTokenRequest.class);
          request.setDelegationToken(convertToProtoToken(token));
          rmClient.cancelDelegationToken(request);
        } catch (YarnException e) {
          throw new IOException(e);
        } finally {
          RPC.stopProxy(rmClient);
        }
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.