org.apache.hadoop.mapreduce.v2.api.protocolrecords.FailTaskAttemptRequest Java Examples

The following examples show how to use org.apache.hadoop.mapreduce.v2.api.protocolrecords.FailTaskAttemptRequest. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MRClientService.java    From hadoop with Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("unchecked")
@Override
public FailTaskAttemptResponse failTaskAttempt(
    FailTaskAttemptRequest request) throws IOException {
  TaskAttemptId taskAttemptId = request.getTaskAttemptId();
  UserGroupInformation callerUGI = UserGroupInformation.getCurrentUser();
  String message = "Fail task attempt " + taskAttemptId
      + " received from " + callerUGI + " at "
      + Server.getRemoteAddress();
  LOG.info(message);
  verifyAndGetAttempt(taskAttemptId, JobACL.MODIFY_JOB);
  appContext.getEventHandler().handle(
      new TaskAttemptDiagnosticsUpdateEvent(taskAttemptId, message));
  appContext.getEventHandler().handle(
      new TaskAttemptEvent(taskAttemptId, 
          TaskAttemptEventType.TA_FAILMSG));
  FailTaskAttemptResponse response = recordFactory.
    newRecordInstance(FailTaskAttemptResponse.class);
  return response;
}
 
Example #2
Source File: MRClientService.java    From big-c with Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("unchecked")
@Override
public FailTaskAttemptResponse failTaskAttempt(
    FailTaskAttemptRequest request) throws IOException {
  TaskAttemptId taskAttemptId = request.getTaskAttemptId();
  UserGroupInformation callerUGI = UserGroupInformation.getCurrentUser();
  String message = "Fail task attempt " + taskAttemptId
      + " received from " + callerUGI + " at "
      + Server.getRemoteAddress();
  LOG.info(message);
  verifyAndGetAttempt(taskAttemptId, JobACL.MODIFY_JOB);
  appContext.getEventHandler().handle(
      new TaskAttemptDiagnosticsUpdateEvent(taskAttemptId, message));
  appContext.getEventHandler().handle(
      new TaskAttemptEvent(taskAttemptId, 
          TaskAttemptEventType.TA_FAILMSG));
  FailTaskAttemptResponse response = recordFactory.
    newRecordInstance(FailTaskAttemptResponse.class);
  return response;
}
 
Example #3
Source File: NotRunningJob.java    From big-c with Apache License 2.0 5 votes vote down vote up
@Override
public FailTaskAttemptResponse failTaskAttempt(
    FailTaskAttemptRequest request) throws IOException {
  FailTaskAttemptResponse resp =
    recordFactory.newRecordInstance(FailTaskAttemptResponse.class);
  return resp;
}
 
Example #4
Source File: NotRunningJob.java    From tez with Apache License 2.0 5 votes vote down vote up
@Override
public FailTaskAttemptResponse failTaskAttempt(
    FailTaskAttemptRequest request) throws IOException {
  FailTaskAttemptResponse resp =
    recordFactory.newRecordInstance(FailTaskAttemptResponse.class);
  return resp;
}
 
Example #5
Source File: NotRunningJob.java    From incubator-tez with Apache License 2.0 5 votes vote down vote up
@Override
public FailTaskAttemptResponse failTaskAttempt(
    FailTaskAttemptRequest request) throws IOException {
  FailTaskAttemptResponse resp =
    recordFactory.newRecordInstance(FailTaskAttemptResponse.class);
  return resp;
}
 
Example #6
Source File: MRClientProtocolPBClientImpl.java    From big-c with Apache License 2.0 5 votes vote down vote up
@Override
public FailTaskAttemptResponse failTaskAttempt(FailTaskAttemptRequest request)
    throws IOException {
  FailTaskAttemptRequestProto requestProto = ((FailTaskAttemptRequestPBImpl)request).getProto();
  try {
    return new FailTaskAttemptResponsePBImpl(proxy.failTaskAttempt(null, requestProto));
  } catch (ServiceException e) {
    throw unwrapAndThrowException(e);
  }
}
 
Example #7
Source File: MRClientProtocolPBServiceImpl.java    From big-c with Apache License 2.0 5 votes vote down vote up
@Override
public FailTaskAttemptResponseProto failTaskAttempt(RpcController controller,
    FailTaskAttemptRequestProto proto) throws ServiceException {
  FailTaskAttemptRequest request = new FailTaskAttemptRequestPBImpl(proto);
  try {
    FailTaskAttemptResponse response = real.failTaskAttempt(request);
    return ((FailTaskAttemptResponsePBImpl)response).getProto();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
 
Example #8
Source File: ClientServiceDelegate.java    From big-c with Apache License 2.0 5 votes vote down vote up
public boolean killTask(TaskAttemptID taskAttemptID, boolean fail)
     throws IOException {
  org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptID
    = TypeConverter.toYarn(taskAttemptID);
  if (fail) {
    FailTaskAttemptRequest failRequest = recordFactory.newRecordInstance(FailTaskAttemptRequest.class);
    failRequest.setTaskAttemptId(attemptID);
    invoke("failTaskAttempt", FailTaskAttemptRequest.class, failRequest);
  } else {
    KillTaskAttemptRequest killRequest = recordFactory.newRecordInstance(KillTaskAttemptRequest.class);
    killRequest.setTaskAttemptId(attemptID);
    invoke("killTaskAttempt", KillTaskAttemptRequest.class, killRequest);
  }
  return true;
}
 
Example #9
Source File: MRClientProtocolPBClientImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public FailTaskAttemptResponse failTaskAttempt(FailTaskAttemptRequest request)
    throws IOException {
  FailTaskAttemptRequestProto requestProto = ((FailTaskAttemptRequestPBImpl)request).getProto();
  try {
    return new FailTaskAttemptResponsePBImpl(proxy.failTaskAttempt(null, requestProto));
  } catch (ServiceException e) {
    throw unwrapAndThrowException(e);
  }
}
 
Example #10
Source File: MRClientProtocolPBServiceImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public FailTaskAttemptResponseProto failTaskAttempt(RpcController controller,
    FailTaskAttemptRequestProto proto) throws ServiceException {
  FailTaskAttemptRequest request = new FailTaskAttemptRequestPBImpl(proto);
  try {
    FailTaskAttemptResponse response = real.failTaskAttempt(request);
    return ((FailTaskAttemptResponsePBImpl)response).getProto();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
 
Example #11
Source File: ClientServiceDelegate.java    From hadoop with Apache License 2.0 5 votes vote down vote up
public boolean killTask(TaskAttemptID taskAttemptID, boolean fail)
     throws IOException {
  org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptID
    = TypeConverter.toYarn(taskAttemptID);
  if (fail) {
    FailTaskAttemptRequest failRequest = recordFactory.newRecordInstance(FailTaskAttemptRequest.class);
    failRequest.setTaskAttemptId(attemptID);
    invoke("failTaskAttempt", FailTaskAttemptRequest.class, failRequest);
  } else {
    KillTaskAttemptRequest killRequest = recordFactory.newRecordInstance(KillTaskAttemptRequest.class);
    killRequest.setTaskAttemptId(attemptID);
    invoke("killTaskAttempt", KillTaskAttemptRequest.class, killRequest);
  }
  return true;
}
 
Example #12
Source File: NotRunningJob.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public FailTaskAttemptResponse failTaskAttempt(
    FailTaskAttemptRequest request) throws IOException {
  FailTaskAttemptResponse resp =
    recordFactory.newRecordInstance(FailTaskAttemptResponse.class);
  return resp;
}
 
Example #13
Source File: HistoryClientService.java    From hadoop with Apache License 2.0 4 votes vote down vote up
@Override
public FailTaskAttemptResponse failTaskAttempt(
    FailTaskAttemptRequest request) throws IOException {
  throw new IOException("Invalid operation on completed job");
}
 
Example #14
Source File: TestRPCFactories.java    From hadoop with Apache License 2.0 4 votes vote down vote up
@Override
public FailTaskAttemptResponse failTaskAttempt(
    FailTaskAttemptRequest request) throws IOException {
  return null;
}
 
Example #15
Source File: TestClientRedirect.java    From big-c with Apache License 2.0 4 votes vote down vote up
@Override
public FailTaskAttemptResponse failTaskAttempt(
    FailTaskAttemptRequest request) throws IOException {
  return null;
}
 
Example #16
Source File: TestClientRedirect.java    From hadoop with Apache License 2.0 4 votes vote down vote up
@Override
public FailTaskAttemptResponse failTaskAttempt(
    FailTaskAttemptRequest request) throws IOException {
  return null;
}
 
Example #17
Source File: TestRPCFactories.java    From big-c with Apache License 2.0 4 votes vote down vote up
@Override
public FailTaskAttemptResponse failTaskAttempt(
    FailTaskAttemptRequest request) throws IOException {
  return null;
}
 
Example #18
Source File: HistoryClientService.java    From big-c with Apache License 2.0 4 votes vote down vote up
@Override
public FailTaskAttemptResponse failTaskAttempt(
    FailTaskAttemptRequest request) throws IOException {
  throw new IOException("Invalid operation on completed job");
}
 
Example #19
Source File: MRClientProtocol.java    From big-c with Apache License 2.0 votes vote down vote up
public FailTaskAttemptResponse failTaskAttempt(FailTaskAttemptRequest request) throws IOException; 
Example #20
Source File: MRClientProtocol.java    From hadoop with Apache License 2.0 votes vote down vote up
public FailTaskAttemptResponse failTaskAttempt(FailTaskAttemptRequest request) throws IOException;