Examples of RenewDelegationTokenRequest


Examples of org.apache.hadoop.mapreduce.v2.api.protocolrecords.RenewDelegationTokenRequest

      throws IOException, InterruptedException {
    long nextExpTime = loggedInUser.doAs(new PrivilegedExceptionAction<Long>() {

      @Override
      public Long run() throws IOException {
        RenewDelegationTokenRequest request = Records
            .newRecord(RenewDelegationTokenRequest.class);
        request.setDelegationToken(dToken);
        return hsService.renewDelegationToken(request).getNextExpirationTime();
      }
    });
    return nextExpTime;
  }
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.protocolrecords.RenewDelegationTokenRequest

      throws IOException, InterruptedException {
    long nextExpTime = loggedInUser.doAs(new PrivilegedExceptionAction<Long>() {

      @Override
      public Long run() throws IOException {
        RenewDelegationTokenRequest request = Records
            .newRecord(RenewDelegationTokenRequest.class);
        request.setDelegationToken(dToken);
        return hsService.renewDelegationToken(request).getNextExpirationTime();
      }
    });
    return nextExpTime;
  }
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.protocolrecords.RenewDelegationTokenRequest

      throws IOException, InterruptedException {
    long nextExpTime = loggedInUser.doAs(new PrivilegedExceptionAction<Long>() {

      @Override
      public Long run() throws YarnRemoteException {
        RenewDelegationTokenRequest request = Records
            .newRecord(RenewDelegationTokenRequest.class);
        request.setDelegationToken(dToken);
        return hsService.renewDelegationToken(request).getNextExpirationTime();
      }
    });
    return nextExpTime;
  }
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.protocolrecords.RenewDelegationTokenRequest

      throws IOException, InterruptedException {
    long nextExpTime = loggedInUser.doAs(new PrivilegedExceptionAction<Long>() {

      @Override
      public Long run() throws IOException {
        RenewDelegationTokenRequest request = Records
            .newRecord(RenewDelegationTokenRequest.class);
        request.setDelegationToken(dToken);
        return hsService.renewDelegationToken(request).getNextExpirationTime();
      }
    });
    return nextExpTime;
  }
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.protocolrecords.RenewDelegationTokenRequest

        token.getService().toString());

    MRClientProtocol histProxy = instantiateHistoryProxy(conf,
        SecurityUtil.getTokenServiceAddr(token));
    try {
      RenewDelegationTokenRequest request = Records
          .newRecord(RenewDelegationTokenRequest.class);
      request.setDelegationToken(dToken);
      return histProxy.renewDelegationToken(request).getNextExpirationTime();
    } finally {
      stopHistoryProxy(histProxy);
    }
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.protocolrecords.RenewDelegationTokenRequest

    assertEquals("MR_DELEGATION_TOKEN", delegationTokenResponse.getDelegationToken().getKind());
    assertNotNull(delegationTokenResponse.getDelegationToken().getIdentifier());

    //renewDelegationToken

    RenewDelegationTokenRequest renewDelegationRequest = recordFactory
            .newRecordInstance(RenewDelegationTokenRequest.class);
    renewDelegationRequest.setDelegationToken(delegationTokenResponse.getDelegationToken());
    RenewDelegationTokenResponse renewDelegationTokenResponse = protocol.renewDelegationToken(renewDelegationRequest);
    // should be about 1 day
    assertTrue(renewDelegationTokenResponse.getNextExpirationTime() > 0);

View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.protocolrecords.RenewDelegationTokenRequest

      throws IOException, InterruptedException {
    long nextExpTime = loggedInUser.doAs(new PrivilegedExceptionAction<Long>() {

      @Override
      public Long run() throws YarnRemoteException {
        RenewDelegationTokenRequest request = Records
            .newRecord(RenewDelegationTokenRequest.class);
        request.setDelegationToken(dToken);
        return hsService.renewDelegationToken(request).getNextExpirationTime();
      }
    });
    return nextExpTime;
  }
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.protocolrecords.RenewDelegationTokenRequest

          token.getPassword(), token.getService().toString());

    MRClientProtocol histProxy = instantiateHistoryProxy(conf,
        SecurityUtil.getTokenServiceAddr(token));
    try {
      RenewDelegationTokenRequest request = Records
          .newRecord(RenewDelegationTokenRequest.class);
      request.setDelegationToken(dToken);
      return histProxy.renewDelegationToken(request).getNextExpirationTime();
    } finally {
      stopHistoryProxy(histProxy);
    }
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.protocolrecords.RenewDelegationTokenRequest

    assertEquals("MR_DELEGATION_TOKEN", delegationTokenResponse.getDelegationToken().getKind());
    assertNotNull(delegationTokenResponse.getDelegationToken().getIdentifier());

    //renewDelegationToken

    RenewDelegationTokenRequest renewDelegationRequest = recordFactory
            .newRecordInstance(RenewDelegationTokenRequest.class);
    renewDelegationRequest.setDelegationToken(delegationTokenResponse.getDelegationToken());
    RenewDelegationTokenResponse renewDelegationTokenResponse = protocol.renewDelegationToken(renewDelegationRequest);
    // should be about 1 day
    assertTrue(renewDelegationTokenResponse.getNextExpirationTime() > 0);

View Full Code Here

Examples of org.apache.hadoop.yarn.api.protocolrecords.RenewDelegationTokenRequest

      final org.apache.hadoop.yarn.api.records.Token dToken)
      throws IOException, InterruptedException {
    long nextExpTime = loggedInUser.doAs(new PrivilegedExceptionAction<Long>() {
      @Override
      public Long run() throws YarnException, IOException {
        RenewDelegationTokenRequest request = Records
            .newRecord(RenewDelegationTokenRequest.class);
        request.setDelegationToken(dToken);
        return clientRMService.renewDelegationToken(request)
            .getNextExpirationTime();
      }
    });
    return nextExpTime;
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.