Java源码示例:org.apache.hadoop.classification.InterfaceStability.Stable

示例1
@Public
@Stable
public static AllocateResponse newInstance(int responseId,
    List<ContainerStatus> completedContainers,
    List<Container> allocatedContainers, List<NodeReport> updatedNodes,
    Resource availResources, AMCommand command, int numClusterNodes,
    PreemptionMessage preempt, List<NMToken> nmTokens,
    List<ContainerResourceIncrease> increasedContainers,
    List<ContainerResourceDecrease> decreasedContainers) {
  AllocateResponse response = newInstance(responseId, completedContainers,
      allocatedContainers, updatedNodes, availResources, command,
      numClusterNodes, preempt, nmTokens);
  response.setIncreasedContainers(increasedContainers);
  response.setDecreasedContainers(decreasedContainers);
  return response;
}
 
示例2
@Public
@Stable
public static GetContainerStatusesRequest newInstance(
    List<ContainerId> containerIds) {
  GetContainerStatusesRequest request =
      Records.newRecord(GetContainerStatusesRequest.class);
  request.setContainerIds(containerIds);
  return request;
}
 
示例3
@Public
@Stable
public static StartContainersRequest newInstance(
    List<StartContainerRequest> requests) {
  StartContainersRequest request =
      Records.newRecord(StartContainersRequest.class);
  request.setStartContainerRequests(requests);
  return request;
}
 
示例4
@Public
@Stable
public static RefreshUserToGroupsMappingsRequest newInstance() {
  RefreshUserToGroupsMappingsRequest request =
      Records.newRecord(RefreshUserToGroupsMappingsRequest.class);
  return request;
}
 
示例5
@Public
@Stable
public static RefreshServiceAclsRequest newInstance() {
  RefreshServiceAclsRequest request =
      Records.newRecord(RefreshServiceAclsRequest.class);
  return request;
}
 
示例6
@Public
@Stable
public static URL newInstance(String scheme, String host, int port, String file) {
  URL url = Records.newRecord(URL.class);
  url.setScheme(scheme);
  url.setHost(host);
  url.setPort(port);
  url.setFile(file);
  return url;
}
 
示例7
@Public
@Stable 
public static GetClusterNodesRequest newInstance() {
  GetClusterNodesRequest request =
      Records.newRecord(GetClusterNodesRequest.class);
  return request;
}
 
示例8
@Public
@Stable
public static SubmitApplicationRequest newInstance(
    ApplicationSubmissionContext context) {
  SubmitApplicationRequest request =
      Records.newRecord(SubmitApplicationRequest.class);
  request.setApplicationSubmissionContext(context);
  return request;
}
 
示例9
@Public
@Stable
@Idempotent
public RefreshSuperUserGroupsConfigurationResponse 
refreshSuperUserGroupsConfiguration(
    RefreshSuperUserGroupsConfigurationRequest request)
throws StandbyException, YarnException, IOException;
 
示例10
/**
 * @return the number of max attempts of the application to be submitted
 */
@Public
@Stable
public abstract int getMaxAppAttempts();
 
示例11
/**
 * <p>Set the queue that the application was placed in.<p>
 */
@Public
@Stable
public abstract void setQueue(String queue);
 
示例12
@Public
@Stable
public abstract void setRenewer(String renewer);
 
示例13
/**
 * @param value true if RM should not manage the AM
 */
@Public
@Stable
public abstract void setUnmanagedAM(boolean value);
 
示例14
/**
 * The main api between the ApplicationMaster and the Scheduler.
 * The ApplicationMaster is updating his future resource requirements
 * and may release containers he doens't need.
 * 
 * @param appAttemptId
 * @param ask
 * @param release
 * @param blacklistAdditions 
 * @param blacklistRemovals 
 * @return the {@link Allocation} for the application
 */
@Public
@Stable
Allocation 
allocate(ApplicationAttemptId appAttemptId, 
    List<ResourceRequest> ask,
    List<ContainerId> release, 
    List<String> blacklistAdditions, 
    List<String> blacklistRemovals);
 
示例15
/**
 * <p>The interface used by clients to obtain a new {@link ApplicationId} for 
 * submitting new applications.</p>
 * 
 * <p>The <code>ResourceManager</code> responds with a new, monotonically
 * increasing, {@link ApplicationId} which is used by the client to submit
 * a new application.</p>
 *
 * <p>The <code>ResourceManager</code> also responds with details such 
 * as maximum resource capabilities in the cluster as specified in
 * {@link GetNewApplicationResponse}.</p>
 *
 * @param request request to get a new <code>ApplicationId</code>
 * @return response containing the new <code>ApplicationId</code> to be used
 * to submit an application
 * @throws YarnException
 * @throws IOException
 * @see #submitApplication(SubmitApplicationRequest)
 */
@Public
@Stable
@Idempotent
public GetNewApplicationResponse getNewApplication(
    GetNewApplicationRequest request)
throws YarnException, IOException;
 
示例16
/**
 * <p>The interface used by clients to get metrics about the cluster from
 * the <code>ResourceManager</code>.</p>
 * 
 * <p>The <code>ResourceManager</code> responds with a
 * {@link GetClusterMetricsResponse} which includes the 
 * {@link YarnClusterMetrics} with details such as number of current
 * nodes in the cluster.</p>
 * 
 * @param request request for cluster metrics
 * @return cluster metrics
 * @throws YarnException
 * @throws IOException
 */
@Public
@Stable
@Idempotent
public GetClusterMetricsResponse getClusterMetrics(
    GetClusterMetricsRequest request) 
throws YarnException, IOException;
 
示例17
/**
 * Is the node healthy?
 * @return <code>true</code> if the node is healthy, else <code>false</code>
 */
@Public
@Stable
public abstract boolean getIsNodeHealthy();
 
示例18
/**
 * Get the <em>diagnostic health report</em> of the node.
 * @return <em>diagnostic health report</em> of the node
 */
@Public
@Stable
public abstract String getHealthReport();
 
示例19
/**
 * The Delegation tokens have a identifier which maps to
 * {@link AbstractDelegationTokenIdentifier}.
 *
 */
@Public
@Stable
public abstract Token getRMDelegationToken();
 
示例20
/**
 * Get the host of the URL.
 * @return host of the URL
 */
@Public
@Stable
public abstract String getHost();
 
示例21
/**
 * Get acls for queues for current user.
 * @return acls for queues for current user
 */
@Public
@Stable
public List<QueueUserACLInfo> getQueueUserAclInfo();
 
示例22
/**
 * Get the <em>port</em> for communicating with the node.
 * @return <em>port</em> for communicating with the node
 */
@Public
@Stable
public abstract int getPort();
 
示例23
/**
 * Get maximum allocatable {@link Resource} at the cluster level.
 * @return maximum allocatable resource
 */
@Public
@Stable
public Resource getMaximumResourceCapability();
 
示例24
/**
 * Get maximum allocatable {@link Resource} for the queue specified.
 * @param queueName queue name
 * @return maximum allocatable resource
 */
@Public
@Stable
public Resource getMaximumResourceCapability(String queueName);
 
示例25
/**
 * Set the <code>Resource</code> capability of the request
 * @param capability <code>Resource</code> capability of the request
 */
@Public
@Stable
public abstract void setCapability(Resource capability);
 
示例26
/**
 * Get the service to which the token is allocated.
 * @return service to which the token is allocated
 */
@Public
@Stable
public abstract String getService();
 
示例27
/** 
 * Get the <em>diagnostic health report</em> of the node.
 * @return <em>diagnostic health report</em> of the node
 */
@Public
@Stable
public abstract String getHealthReport();
 
示例28
/**
 * Get the <code>Priority</code> of the request.
 * @return <code>Priority</code> of the request
 */
@Public
@Stable
public abstract Priority getPriority();
 
示例29
/**
 * Get the application states to filter applications on
 *
 * @return Set of Application states to filter on
 */
@Public
@Stable
public abstract EnumSet<YarnApplicationState> getApplicationStates();
 
示例30
/**
 * <p>
 * The <code>ApplicationMaster</code> requests a <code>NodeManager</code> to
 * <em>stop</em> a list of {@link Container}s allocated to it using this
 * interface.
 * </p>
 * 
 * <p>
 * The <code>ApplicationMaster</code> sends a {@link StopContainersRequest}
 * which includes the {@link ContainerId}s of the containers to be stopped.
 * </p>
 * 
 * <p>
 * The <code>NodeManager</code> sends a response via
 * {@link StopContainersResponse} which includes a list of {@link ContainerId}
 * s of successfully stopped containers, a containerId-to-exception map for
 * each failed request in which the exception indicates errors from per
 * container. Note: None-container-specific exceptions will still be thrown by
 * the API method itself. <code>ApplicationMaster</code> can use
 * {@link #getContainerStatuses(GetContainerStatusesRequest)} to get updated
 * statuses of the containers.
 * </p>
 * 
 * @param request
 *          request to stop a list of containers
 * @return response which includes a list of containerIds of successfully
 *         stopped containers, a containerId-to-exception map for failed
 *         requests.
 * @throws YarnException
 * @throws IOException
 */
@Public
@Stable
StopContainersResponse stopContainers(StopContainersRequest request)
    throws YarnException, IOException;