Java Code Examples for org.apache.hadoop.mapreduce.v2.api.protocolrecords.KillTaskRequest

The following examples show how to use org.apache.hadoop.mapreduce.v2.api.protocolrecords.KillTaskRequest. These examples are extracted from open source projects. 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 Project: hadoop   Source File: MRClientService.java    License: Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("unchecked")
@Override
public KillTaskResponse killTask(KillTaskRequest request) 
  throws IOException {
  TaskId taskId = request.getTaskId();
  UserGroupInformation callerUGI = UserGroupInformation.getCurrentUser();
  String message = "Kill task " + taskId + " received from " + callerUGI
      + " at " + Server.getRemoteAddress();
  LOG.info(message);
  verifyAndGetTask(taskId, JobACL.MODIFY_JOB);
  appContext.getEventHandler().handle(
      new TaskEvent(taskId, TaskEventType.T_KILL));
  KillTaskResponse response = 
    recordFactory.newRecordInstance(KillTaskResponse.class);
  return response;
}
 
Example 2
Source Project: big-c   Source File: MRClientService.java    License: Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("unchecked")
@Override
public KillTaskResponse killTask(KillTaskRequest request) 
  throws IOException {
  TaskId taskId = request.getTaskId();
  UserGroupInformation callerUGI = UserGroupInformation.getCurrentUser();
  String message = "Kill task " + taskId + " received from " + callerUGI
      + " at " + Server.getRemoteAddress();
  LOG.info(message);
  verifyAndGetTask(taskId, JobACL.MODIFY_JOB);
  appContext.getEventHandler().handle(
      new TaskEvent(taskId, TaskEventType.T_KILL));
  KillTaskResponse response = 
    recordFactory.newRecordInstance(KillTaskResponse.class);
  return response;
}
 
Example 3
Source Project: hadoop   Source File: NotRunningJob.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public KillTaskResponse killTask(KillTaskRequest request)
    throws IOException {
  KillTaskResponse resp =
    recordFactory.newRecordInstance(KillTaskResponse.class);
  return resp;
}
 
Example 4
Source Project: hadoop   Source File: MRClientProtocolPBServiceImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public KillTaskResponseProto killTask(RpcController controller,
    KillTaskRequestProto proto) throws ServiceException {
  KillTaskRequest request = new KillTaskRequestPBImpl(proto);
  try {
    KillTaskResponse response = real.killTask(request);
    return ((KillTaskResponsePBImpl)response).getProto();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
 
Example 5
Source Project: hadoop   Source File: MRClientProtocolPBClientImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public KillTaskResponse killTask(KillTaskRequest request)
    throws IOException {
  KillTaskRequestProto requestProto = ((KillTaskRequestPBImpl)request).getProto();
  try {
    return new KillTaskResponsePBImpl(proxy.killTask(null, requestProto));
  } catch (ServiceException e) {
    throw unwrapAndThrowException(e);
  }
}
 
Example 6
Source Project: big-c   Source File: NotRunningJob.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public KillTaskResponse killTask(KillTaskRequest request)
    throws IOException {
  KillTaskResponse resp =
    recordFactory.newRecordInstance(KillTaskResponse.class);
  return resp;
}
 
Example 7
Source Project: big-c   Source File: MRClientProtocolPBServiceImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public KillTaskResponseProto killTask(RpcController controller,
    KillTaskRequestProto proto) throws ServiceException {
  KillTaskRequest request = new KillTaskRequestPBImpl(proto);
  try {
    KillTaskResponse response = real.killTask(request);
    return ((KillTaskResponsePBImpl)response).getProto();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
 
Example 8
Source Project: big-c   Source File: MRClientProtocolPBClientImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public KillTaskResponse killTask(KillTaskRequest request)
    throws IOException {
  KillTaskRequestProto requestProto = ((KillTaskRequestPBImpl)request).getProto();
  try {
    return new KillTaskResponsePBImpl(proxy.killTask(null, requestProto));
  } catch (ServiceException e) {
    throw unwrapAndThrowException(e);
  }
}
 
Example 9
Source Project: incubator-tez   Source File: NotRunningJob.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public KillTaskResponse killTask(KillTaskRequest request)
    throws IOException {
  KillTaskResponse resp =
    recordFactory.newRecordInstance(KillTaskResponse.class);
  return resp;
}
 
Example 10
Source Project: tez   Source File: NotRunningJob.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public KillTaskResponse killTask(KillTaskRequest request)
    throws IOException {
  KillTaskResponse resp =
    recordFactory.newRecordInstance(KillTaskResponse.class);
  return resp;
}
 
Example 11
Source Project: hadoop   Source File: TestClientRedirect.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public KillTaskResponse killTask(KillTaskRequest request)
    throws IOException {
  return null;
}
 
Example 12
Source Project: hadoop   Source File: TestRPCFactories.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public KillTaskResponse killTask(KillTaskRequest request)
    throws IOException {
  return null;
}
 
Example 13
Source Project: hadoop   Source File: HistoryClientService.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public KillTaskResponse killTask(KillTaskRequest request)
    throws IOException {
  throw new IOException("Invalid operation on completed job");
}
 
Example 14
Source Project: big-c   Source File: TestClientRedirect.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public KillTaskResponse killTask(KillTaskRequest request)
    throws IOException {
  return null;
}
 
Example 15
Source Project: big-c   Source File: TestRPCFactories.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public KillTaskResponse killTask(KillTaskRequest request)
    throws IOException {
  return null;
}
 
Example 16
Source Project: big-c   Source File: HistoryClientService.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public KillTaskResponse killTask(KillTaskRequest request)
    throws IOException {
  throw new IOException("Invalid operation on completed job");
}
 
Example 17
Source Project: hadoop   Source File: MRClientProtocol.java    License: Apache License 2.0 votes vote down vote up
public KillTaskResponse killTask(KillTaskRequest request) throws IOException; 
Example 18
Source Project: big-c   Source File: MRClientProtocol.java    License: Apache License 2.0 votes vote down vote up
public KillTaskResponse killTask(KillTaskRequest request) throws IOException;