Package org.apache.hadoop.mapreduce.v2.api.protocolrecords

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


      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

      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

      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

        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

    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

      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

          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

    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

    YarnConfiguration conf = new YarnConfiguration();
    conf.set(MRJobConfig.MR_AM_STAGING_DIR, stagingDir);
    JobContext mockJobContext = mock(JobContext.class);
    ApplicationAttemptId attemptid =
      ConverterUtils.toApplicationAttemptId("appattempt_1234567890000_0001_0");
    JobId jobId =  TypeConverter.toYarn(
        TypeConverter.fromYarn(attemptid.getApplicationId()));
   
    WaitForItHandler waitForItHandler = new WaitForItHandler();
   
    when(mockContext.getApplicationID()).thenReturn(attemptid.getApplicationId());
View Full Code Here

TOP

Related Classes of org.apache.hadoop.mapreduce.v2.api.protocolrecords.RenewDelegationTokenRequest

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.