Java 类org.apache.hadoop.yarn.api.protocolrecords.ReservationDeleteResponse 实例源码

项目:hadoop    文件:ApplicationClientProtocolPBClientImpl.java   
@Override
public ReservationDeleteResponse deleteReservation(ReservationDeleteRequest request)
    throws YarnException, IOException {
  ReservationDeleteRequestProto requestProto =
      ((ReservationDeleteRequestPBImpl) request).getProto();
  try {
    return new ReservationDeleteResponsePBImpl(proxy.deleteReservation(null,
        requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
项目:hadoop    文件:ClientRMService.java   
@Override
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException {
  // Check if reservation system is enabled
  checkReservationSytem(AuditConstants.DELETE_RESERVATION_REQUEST);
  ReservationDeleteResponse response =
      recordFactory.newRecordInstance(ReservationDeleteResponse.class);
  // Validate the input
  Plan plan =
      rValidator.validateReservationDeleteRequest(reservationSystem, request);
  ReservationId reservationId = request.getReservationId();
  String queueName = reservationSystem.getQueueForReservation(reservationId);
  // Check ACLs
  String user =
      checkReservationACLs(queueName,
          AuditConstants.DELETE_RESERVATION_REQUEST);
  // Try to update the reservation using default agent
  try {
    boolean result =
        plan.getReservationAgent().deleteReservation(reservationId, user,
            plan);
    if (!result) {
      String errMsg = "Could not delete reservation: " + reservationId;
      RMAuditLogger.logFailure(user,
          AuditConstants.DELETE_RESERVATION_REQUEST, errMsg,
          "ClientRMService", errMsg);
      throw RPCUtil.getRemoteException(errMsg);
    }
  } catch (PlanningException e) {
    RMAuditLogger.logFailure(user, AuditConstants.DELETE_RESERVATION_REQUEST,
        e.getMessage(), "ClientRMService",
        "Unable to delete the reservation: " + reservationId);
    throw RPCUtil.getRemoteException(e);
  }
  RMAuditLogger.logSuccess(user, AuditConstants.DELETE_RESERVATION_REQUEST,
      "ClientRMService: " + reservationId);
  return response;
}
项目:aliyun-oss-hadoop-fs    文件:ApplicationClientProtocolPBClientImpl.java   
@Override
public ReservationDeleteResponse deleteReservation(ReservationDeleteRequest request)
    throws YarnException, IOException {
  ReservationDeleteRequestProto requestProto =
      ((ReservationDeleteRequestPBImpl) request).getProto();
  try {
    return new ReservationDeleteResponsePBImpl(proxy.deleteReservation(null,
        requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
项目:aliyun-oss-hadoop-fs    文件:ClientRMService.java   
@Override
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException {
  // Check if reservation system is enabled
  checkReservationSytem(AuditConstants.DELETE_RESERVATION_REQUEST);
  ReservationDeleteResponse response =
      recordFactory.newRecordInstance(ReservationDeleteResponse.class);
  // Validate the input
  Plan plan =
      rValidator.validateReservationDeleteRequest(reservationSystem, request);
  ReservationId reservationId = request.getReservationId();
  String queueName = reservationSystem.getQueueForReservation(reservationId);
  // Check ACLs
  String user =
      checkReservationACLs(queueName,
          AuditConstants.DELETE_RESERVATION_REQUEST);
  // Try to update the reservation using default agent
  try {
    boolean result =
        plan.getReservationAgent().deleteReservation(reservationId, user,
            plan);
    if (!result) {
      String errMsg = "Could not delete reservation: " + reservationId;
      RMAuditLogger.logFailure(user,
          AuditConstants.DELETE_RESERVATION_REQUEST, errMsg,
          "ClientRMService", errMsg);
      throw RPCUtil.getRemoteException(errMsg);
    }
  } catch (PlanningException e) {
    RMAuditLogger.logFailure(user, AuditConstants.DELETE_RESERVATION_REQUEST,
        e.getMessage(), "ClientRMService",
        "Unable to delete the reservation: " + reservationId);
    throw RPCUtil.getRemoteException(e);
  }
  RMAuditLogger.logSuccess(user, AuditConstants.DELETE_RESERVATION_REQUEST,
      "ClientRMService: " + reservationId);
  return response;
}
项目:big-c    文件:ApplicationClientProtocolPBClientImpl.java   
@Override
public ReservationDeleteResponse deleteReservation(ReservationDeleteRequest request)
    throws YarnException, IOException {
  ReservationDeleteRequestProto requestProto =
      ((ReservationDeleteRequestPBImpl) request).getProto();
  try {
    return new ReservationDeleteResponsePBImpl(proxy.deleteReservation(null,
        requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
项目:big-c    文件:ClientRMService.java   
@Override
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException {
  // Check if reservation system is enabled
  checkReservationSytem(AuditConstants.DELETE_RESERVATION_REQUEST);
  ReservationDeleteResponse response =
      recordFactory.newRecordInstance(ReservationDeleteResponse.class);
  // Validate the input
  Plan plan =
      rValidator.validateReservationDeleteRequest(reservationSystem, request);
  ReservationId reservationId = request.getReservationId();
  String queueName = reservationSystem.getQueueForReservation(reservationId);
  // Check ACLs
  String user =
      checkReservationACLs(queueName,
          AuditConstants.DELETE_RESERVATION_REQUEST);
  // Try to update the reservation using default agent
  try {
    boolean result =
        plan.getReservationAgent().deleteReservation(reservationId, user,
            plan);
    if (!result) {
      String errMsg = "Could not delete reservation: " + reservationId;
      RMAuditLogger.logFailure(user,
          AuditConstants.DELETE_RESERVATION_REQUEST, errMsg,
          "ClientRMService", errMsg);
      throw RPCUtil.getRemoteException(errMsg);
    }
  } catch (PlanningException e) {
    RMAuditLogger.logFailure(user, AuditConstants.DELETE_RESERVATION_REQUEST,
        e.getMessage(), "ClientRMService",
        "Unable to delete the reservation: " + reservationId);
    throw RPCUtil.getRemoteException(e);
  }
  RMAuditLogger.logSuccess(user, AuditConstants.DELETE_RESERVATION_REQUEST,
      "ClientRMService: " + reservationId);
  return response;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ApplicationClientProtocolPBClientImpl.java   
@Override
public ReservationDeleteResponse deleteReservation(ReservationDeleteRequest request)
    throws YarnException, IOException {
  ReservationDeleteRequestProto requestProto =
      ((ReservationDeleteRequestPBImpl) request).getProto();
  try {
    return new ReservationDeleteResponsePBImpl(proxy.deleteReservation(null,
        requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ClientRMService.java   
@Override
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException {
  // Check if reservation system is enabled
  checkReservationSytem(AuditConstants.DELETE_RESERVATION_REQUEST);
  ReservationDeleteResponse response =
      recordFactory.newRecordInstance(ReservationDeleteResponse.class);
  // Validate the input
  Plan plan =
      rValidator.validateReservationDeleteRequest(reservationSystem, request);
  ReservationId reservationId = request.getReservationId();
  String queueName = reservationSystem.getQueueForReservation(reservationId);
  // Check ACLs
  String user =
      checkReservationACLs(queueName,
          AuditConstants.DELETE_RESERVATION_REQUEST);
  // Try to update the reservation using default agent
  try {
    boolean result =
        plan.getReservationAgent().deleteReservation(reservationId, user,
            plan);
    if (!result) {
      String errMsg = "Could not delete reservation: " + reservationId;
      RMAuditLogger.logFailure(user,
          AuditConstants.DELETE_RESERVATION_REQUEST, errMsg,
          "ClientRMService", errMsg);
      throw RPCUtil.getRemoteException(errMsg);
    }
  } catch (PlanningException e) {
    RMAuditLogger.logFailure(user, AuditConstants.DELETE_RESERVATION_REQUEST,
        e.getMessage(), "ClientRMService",
        "Unable to delete the reservation: " + reservationId);
    throw RPCUtil.getRemoteException(e);
  }
  RMAuditLogger.logSuccess(user, AuditConstants.DELETE_RESERVATION_REQUEST,
      "ClientRMService: " + reservationId);
  return response;
}
项目:hops    文件:ApplicationClientProtocolPBClientImpl.java   
@Override
public ReservationDeleteResponse deleteReservation(ReservationDeleteRequest request)
    throws YarnException, IOException {
  ReservationDeleteRequestProto requestProto =
      ((ReservationDeleteRequestPBImpl) request).getProto();
  try {
    return new ReservationDeleteResponsePBImpl(proxy.deleteReservation(null,
        requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
项目:hops    文件:ClientRMService.java   
@Override
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException {
  // Check if reservation system is enabled
  checkReservationSytem(AuditConstants.DELETE_RESERVATION_REQUEST);
  ReservationDeleteResponse response =
      recordFactory.newRecordInstance(ReservationDeleteResponse.class);
  // Validate the input
  Plan plan =
      rValidator.validateReservationDeleteRequest(reservationSystem, request);
  ReservationId reservationId = request.getReservationId();
  String queueName = reservationSystem.getQueueForReservation(reservationId);
  // Check ACLs
  String user =
      checkReservationACLs(queueName,
          AuditConstants.DELETE_RESERVATION_REQUEST, reservationId);
  // Try to update the reservation using default agent
  try {
    boolean result =
        plan.getReservationAgent().deleteReservation(reservationId, user,
            plan);
    if (!result) {
      String errMsg = "Could not delete reservation: " + reservationId;
      RMAuditLogger.logFailure(user,
          AuditConstants.DELETE_RESERVATION_REQUEST, errMsg,
          "ClientRMService", errMsg);
      throw RPCUtil.getRemoteException(errMsg);
    }
  } catch (PlanningException e) {
    RMAuditLogger.logFailure(user, AuditConstants.DELETE_RESERVATION_REQUEST,
        e.getMessage(), "ClientRMService",
        "Unable to delete the reservation: " + reservationId);
    throw RPCUtil.getRemoteException(e);
  }
  RMAuditLogger.logSuccess(user, AuditConstants.DELETE_RESERVATION_REQUEST,
      "ClientRMService: " + reservationId);
  return response;
}
项目:hops    文件:TestYarnClient.java   
@Test
public void testReservationDelete() throws Exception {
  MiniYARNCluster cluster = setupMiniYARNCluster();
  YarnClient client = setupYarnClient(cluster);
  try {
    Clock clock = new UTCClock();
    long arrival = clock.getTime();
    long duration = 60000;
    long deadline = (long) (arrival + 1.05 * duration);
    ReservationSubmissionRequest sRequest =
        submitReservationTestHelper(client, arrival, deadline, duration);

    ReservationId reservationID = sRequest.getReservationId();
    // Delete the reservation
    ReservationDeleteRequest dRequest =
        ReservationDeleteRequest.newInstance(reservationID);
    ReservationDeleteResponse dResponse = client.deleteReservation(dRequest);
    Assert.assertNotNull(dResponse);
    System.out.println("Delete reservation response: " + dResponse);

    // List reservations, search by non-existent reservationID
    ReservationListRequest request = ReservationListRequest.newInstance(
        ReservationSystemTestUtil.reservationQ, reservationID.toString(), -1,
        -1, false);

    ReservationListResponse response =  client.listReservations(request);
    Assert.assertNotNull(response);
    Assert.assertEquals(0, response.getReservationAllocationState().size());
  } finally {
    // clean-up
    if (client != null) {
      client.stop();
    }
    cluster.stop();
  }
}
项目:hadoop    文件:YarnClientImpl.java   
@Override
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException {
  return rmClient.deleteReservation(request);
}
项目:hadoop    文件:ResourceMgrDelegate.java   
@Override
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException {
  return client.deleteReservation(request);
}
项目:hadoop    文件:TestClientRedirect.java   
@Override
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException {
  return null;
}
项目:scheduling-connector-for-hadoop    文件:HPCApplicationClientProtocolImpl.java   
@Override
public ReservationDeleteResponse deleteReservation(ReservationDeleteRequest arg0)
        throws YarnException, IOException {
    // TODO Auto-generated method stub
    return null;
}
项目:aliyun-oss-hadoop-fs    文件:MockResourceManagerFacade.java   
@Override
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException {
  throw new NotImplementedException();
}
项目:aliyun-oss-hadoop-fs    文件:YarnClientImpl.java   
@Override
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException {
  return rmClient.deleteReservation(request);
}
项目:aliyun-oss-hadoop-fs    文件:ResourceMgrDelegate.java   
@Override
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException {
  return client.deleteReservation(request);
}
项目:aliyun-oss-hadoop-fs    文件:TestClientRedirect.java   
@Override
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException {
  return null;
}
项目:big-c    文件:YarnClientImpl.java   
@Override
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException {
  return rmClient.deleteReservation(request);
}
项目:big-c    文件:ResourceMgrDelegate.java   
@Override
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException {
  return client.deleteReservation(request);
}
项目:big-c    文件:TestClientRedirect.java   
@Override
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException {
  return null;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:YarnClientImpl.java   
@Override
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException {
  return rmClient.deleteReservation(request);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ResourceMgrDelegate.java   
@Override
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException {
  return client.deleteReservation(request);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestClientRedirect.java   
@Override
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException {
  return null;
}
项目:FlexMap    文件:ResourceMgrDelegate.java   
@Override
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException {
  return client.deleteReservation(request);
}
项目:FlexMap    文件:TestClientRedirect.java   
@Override
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException {
  return null;
}
项目:hops    文件:MockResourceManagerFacade.java   
@Override
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException {
  throw new NotImplementedException();
}
项目:hops    文件:YarnClientImpl.java   
@Override
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException {
  return rmClient.deleteReservation(request);
}
项目:hops    文件:ResourceMgrDelegate.java   
@Override
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException {
  return client.deleteReservation(request);
}
项目:hops    文件:TestClientRedirect.java   
@Override
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException {
  return null;
}
项目:hadoop    文件:YarnClient.java   
/**
 * <p>
 * The interface used by clients to remove an existing Reservation.
 * </p>
 * 
 * @param request to remove an existing Reservation (the
 *          {@link ReservationDeleteRequest} should refer to an existing valid
 *          {@link ReservationId})
 * @return response empty on successfully deleting the existing reservation
 * @throws YarnException if the request is invalid or reservation cannot be
 *           deleted successfully
 * @throws IOException
 * 
 */
@Public
@Unstable
public abstract ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException;
项目:hadoop    文件:ApplicationClientProtocol.java   
/**
 * <p>
 * The interface used by clients to remove an existing Reservation.
 * 
 * Upon deletion of a reservation applications running with this reservation,
 * are automatically downgraded to normal jobs running without any dedicated
 * reservation.
 * </p>
 * 
 * @param request to remove an existing Reservation (the ReservationRequest
 *          should refer to an existing valid {@link ReservationId})
 * @return response empty on successfully deleting the existing reservation
 * @throws YarnException if the request is invalid or reservation cannot be
 *           deleted successfully
 * @throws IOException
 * 
 */
@Public
@Unstable
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException;
项目:aliyun-oss-hadoop-fs    文件:YarnClient.java   
/**
 * <p>
 * The interface used by clients to remove an existing Reservation.
 * </p>
 * 
 * @param request to remove an existing Reservation (the
 *          {@link ReservationDeleteRequest} should refer to an existing valid
 *          {@link ReservationId})
 * @return response empty on successfully deleting the existing reservation
 * @throws YarnException if the request is invalid or reservation cannot be
 *           deleted successfully
 * @throws IOException
 * 
 */
@Public
@Unstable
public abstract ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException;
项目:aliyun-oss-hadoop-fs    文件:ApplicationClientProtocol.java   
/**
 * <p>
 * The interface used by clients to remove an existing Reservation.
 * 
 * Upon deletion of a reservation applications running with this reservation,
 * are automatically downgraded to normal jobs running without any dedicated
 * reservation.
 * </p>
 * 
 * @param request to remove an existing Reservation (the ReservationRequest
 *          should refer to an existing valid {@link ReservationId})
 * @return response empty on successfully deleting the existing reservation
 * @throws YarnException if the request is invalid or reservation cannot be
 *           deleted successfully
 * @throws IOException
 * 
 */
@Public
@Unstable
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException;
项目:big-c    文件:YarnClient.java   
/**
 * <p>
 * The interface used by clients to remove an existing Reservation.
 * </p>
 * 
 * @param request to remove an existing Reservation (the
 *          {@link ReservationDeleteRequest} should refer to an existing valid
 *          {@link ReservationId})
 * @return response empty on successfully deleting the existing reservation
 * @throws YarnException if the request is invalid or reservation cannot be
 *           deleted successfully
 * @throws IOException
 * 
 */
@Public
@Unstable
public abstract ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException;
项目:big-c    文件:ApplicationClientProtocol.java   
/**
 * <p>
 * The interface used by clients to remove an existing Reservation.
 * 
 * Upon deletion of a reservation applications running with this reservation,
 * are automatically downgraded to normal jobs running without any dedicated
 * reservation.
 * </p>
 * 
 * @param request to remove an existing Reservation (the ReservationRequest
 *          should refer to an existing valid {@link ReservationId})
 * @return response empty on successfully deleting the existing reservation
 * @throws YarnException if the request is invalid or reservation cannot be
 *           deleted successfully
 * @throws IOException
 * 
 */
@Public
@Unstable
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException;
项目:hadoop-2.6.0-cdh5.4.3    文件:YarnClient.java   
/**
 * <p>
 * The interface used by clients to remove an existing Reservation.
 * </p>
 * 
 * @param request to remove an existing Reservation (the
 *          {@link ReservationDeleteRequest} should refer to an existing valid
 *          {@link ReservationId})
 * @return response empty on successfully deleting the existing reservation
 * @throws YarnException if the request is invalid or reservation cannot be
 *           deleted successfully
 * @throws IOException
 * 
 */
@Public
@Unstable
public abstract ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException;
项目:hadoop-2.6.0-cdh5.4.3    文件:ApplicationClientProtocol.java   
/**
 * <p>
 * The interface used by clients to remove an existing Reservation.
 * 
 * Upon deletion of a reservation applications running with this reservation,
 * are automatically downgraded to normal jobs running without any dedicated
 * reservation.
 * </p>
 * 
 * @param request to remove an existing Reservation (the ReservationRequest
 *          should refer to an existing valid {@link ReservationId})
 * @return response empty on successfully deleting the existing reservation
 * @throws YarnException if the request is invalid or reservation cannot be
 *           deleted successfully
 * @throws IOException
 * 
 */
@Public
@Unstable
public ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException;
项目:hops    文件:YarnClient.java   
/**
 * <p>
 * The interface used by clients to remove an existing Reservation.
 * </p>
 * 
 * @param request to remove an existing Reservation (the
 *          {@link ReservationDeleteRequest} should refer to an existing valid
 *          {@link ReservationId})
 * @return response empty on successfully deleting the existing reservation
 * @throws YarnException if the request is invalid or reservation cannot be
 *           deleted successfully
 * @throws IOException
 * 
 */
@Public
@Unstable
public abstract ReservationDeleteResponse deleteReservation(
    ReservationDeleteRequest request) throws YarnException, IOException;