org.apache.hadoop.yarn.api.ApplicationClientProtocol.submitReservation()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(95)

本文整理了Java中org.apache.hadoop.yarn.api.ApplicationClientProtocol.submitReservation()方法的一些代码示例,展示了ApplicationClientProtocol.submitReservation()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ApplicationClientProtocol.submitReservation()方法的具体详情如下:
包路径:org.apache.hadoop.yarn.api.ApplicationClientProtocol
类名称:ApplicationClientProtocol
方法名:submitReservation

ApplicationClientProtocol.submitReservation介绍

[英]The interface used by clients to submit a new reservation to the ResourceManager.

The client packages all details of its request in a ReservationSubmissionRequest object. This contains information about the amount of capacity, temporal constraints, and concurrency needs. Furthermore, the reservation might be composed of multiple stages, with ordering dependencies among them.

In order to respond, a new admission control component in the ResourceManager performs an analysis of the resources that have been committed over the period of time the user is requesting, verify that the user requests can be fulfilled, and that it respect a sharing policy (e.g., CapacityOverTimePolicy). Once it has positively determined that the ReservationSubmissionRequest is satisfiable the ResourceManager answers with a ReservationSubmissionResponse that include a non-null ReservationId. Upon failure to find a valid allocation the response is an exception with the reason. On application submission the client can use this ReservationId to obtain access to the reserved resources.

The system guarantees that during the time-range specified by the user, the reservationID will be corresponding to a valid reservation. The amount of capacity dedicated to such queue can vary overtime, depending of the allocation that has been determined. But it is guaranteed to satisfy all the constraint expressed by the user in the ReservationSubmissionRequest.
[中]客户端用于向ResourceManager提交新预订的接口。
客户端将其请求的所有详细信息打包到ReservationSubmissionRequest对象中。其中包含有关容量、时间约束和并发需求的信息。此外,保留可能由多个阶段组成,这些阶段之间具有顺序依赖关系。
为了响应,ResourceManager中的新许可控制组件对用户请求期间提交的资源进行分析,验证用户请求是否可以满足,以及是否遵守共享策略(例如CapacityOverTimePolicy)。一旦确定ReservationSubmissionRequest可满足,ResourceManager将使用包含非空ReservationId的ReservationSubmissionResponse进行回答。如果找不到有效的分配,则响应为异常,原因如下。提交应用程序时,客户端可以使用此ReservationId来访问保留的资源。
系统保证在用户指定的时间范围内,reservationID将与有效的预订相对应。根据已确定的分配,专用于此类队列的容量可以随时间而变化。但它保证满足用户在ReservationSubmissionRequest中表示的所有约束。

代码示例

代码示例来源:origin: io.hops/hadoop-yarn-client

@Override
public ReservationSubmissionResponse submitReservation(
  ReservationSubmissionRequest request) throws YarnException, IOException {
 return rmClient.submitReservation(request);
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-client

@Override
public ReservationSubmissionResponse submitReservation(
  ReservationSubmissionRequest request) throws YarnException, IOException {
 return rmClient.submitReservation(request);
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-client

@Override
public ReservationSubmissionResponse submitReservation(
  ReservationSubmissionRequest request) throws YarnException, IOException {
 return rmClient.submitReservation(request);
}

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-client

@Override
public ReservationSubmissionResponse submitReservation(
  ReservationSubmissionRequest request) throws YarnException, IOException {
 return rmClient.submitReservation(request);
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-router

@Override
public ReservationSubmissionResponse submitReservation(
  ReservationSubmissionRequest request) throws YarnException, IOException {
 return clientRMProxy.submitReservation(request);
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

@Override
public ReservationSubmissionResponseProto submitReservation(RpcController controller,
  ReservationSubmissionRequestProto requestProto) throws ServiceException {
 ReservationSubmissionRequestPBImpl request =
   new ReservationSubmissionRequestPBImpl(requestProto);
 try {
  ReservationSubmissionResponse response = real.submitReservation(request);
  return ((ReservationSubmissionResponsePBImpl) response).getProto();
 } catch (YarnException e) {
  throw new ServiceException(e);
 } catch (IOException e) {
  throw new ServiceException(e);
 }
}

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common

@Override
public ReservationSubmissionResponseProto submitReservation(RpcController controller,
  ReservationSubmissionRequestProto requestProto) throws ServiceException {
 ReservationSubmissionRequestPBImpl request =
   new ReservationSubmissionRequestPBImpl(requestProto);
 try {
  ReservationSubmissionResponse response = real.submitReservation(request);
  return ((ReservationSubmissionResponsePBImpl) response).getProto();
 } catch (YarnException e) {
  throw new ServiceException(e);
 } catch (IOException e) {
  throw new ServiceException(e);
 }
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-common

@Override
public ReservationSubmissionResponseProto submitReservation(RpcController controller,
  ReservationSubmissionRequestProto requestProto) throws ServiceException {
 ReservationSubmissionRequestPBImpl request =
   new ReservationSubmissionRequestPBImpl(requestProto);
 try {
  ReservationSubmissionResponse response = real.submitReservation(request);
  return ((ReservationSubmissionResponsePBImpl) response).getProto();
 } catch (YarnException e) {
  throw new ServiceException(e);
 } catch (IOException e) {
  throw new ServiceException(e);
 }
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

private void submitReservation(String submitter,
  String queueName, ReservationId reservationId) throws Exception {
 ApplicationClientProtocol submitterClient = getRMClientForUser(submitter);
 ReservationSubmissionRequest reservationSubmissionRequest =
   ReservationSubmissionRequest.newInstance(
   makeSimpleReservationDefinition(), queueName, reservationId);
 ReservationSubmissionResponse response = submitterClient
     .submitReservation(reservationSubmissionRequest);
}

相关文章

微信公众号

最新文章

更多

ApplicationClientProtocol类方法