Java Code Examples for org.apache.hadoop.classification.InterfaceStability.Stable

The following examples show how to use org.apache.hadoop.classification.InterfaceStability.Stable. 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: AllocateResponse.java    License: Apache License 2.0 6 votes vote down vote up
@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;
}
 
Example 2
Source Project: hadoop   Source File: GetContainerStatusesRequest.java    License: Apache License 2.0 5 votes vote down vote up
@Public
@Stable
public static GetContainerStatusesRequest newInstance(
    List<ContainerId> containerIds) {
  GetContainerStatusesRequest request =
      Records.newRecord(GetContainerStatusesRequest.class);
  request.setContainerIds(containerIds);
  return request;
}
 
Example 3
Source Project: hadoop   Source File: StartContainersRequest.java    License: Apache License 2.0 5 votes vote down vote up
@Public
@Stable
public static StartContainersRequest newInstance(
    List<StartContainerRequest> requests) {
  StartContainersRequest request =
      Records.newRecord(StartContainersRequest.class);
  request.setStartContainerRequests(requests);
  return request;
}
 
Example 4
Source Project: hadoop   Source File: RefreshUserToGroupsMappingsRequest.java    License: Apache License 2.0 5 votes vote down vote up
@Public
@Stable
public static RefreshUserToGroupsMappingsRequest newInstance() {
  RefreshUserToGroupsMappingsRequest request =
      Records.newRecord(RefreshUserToGroupsMappingsRequest.class);
  return request;
}
 
Example 5
Source Project: hadoop   Source File: RefreshServiceAclsRequest.java    License: Apache License 2.0 5 votes vote down vote up
@Public
@Stable
public static RefreshServiceAclsRequest newInstance() {
  RefreshServiceAclsRequest request =
      Records.newRecord(RefreshServiceAclsRequest.class);
  return request;
}
 
Example 6
Source Project: hadoop   Source File: URL.java    License: Apache License 2.0 5 votes vote down vote up
@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;
}
 
Example 7
Source Project: hadoop   Source File: GetClusterNodesRequest.java    License: Apache License 2.0 5 votes vote down vote up
@Public
@Stable 
public static GetClusterNodesRequest newInstance() {
  GetClusterNodesRequest request =
      Records.newRecord(GetClusterNodesRequest.class);
  return request;
}
 
Example 8
Source Project: hadoop   Source File: SubmitApplicationRequest.java    License: Apache License 2.0 5 votes vote down vote up
@Public
@Stable
public static SubmitApplicationRequest newInstance(
    ApplicationSubmissionContext context) {
  SubmitApplicationRequest request =
      Records.newRecord(SubmitApplicationRequest.class);
  request.setApplicationSubmissionContext(context);
  return request;
}
 
Example 9
@Public
@Stable
@Idempotent
public RefreshSuperUserGroupsConfigurationResponse 
refreshSuperUserGroupsConfiguration(
    RefreshSuperUserGroupsConfigurationRequest request)
throws StandbyException, YarnException, IOException;
 
Example 10
Source Project: hadoop   Source File: ApplicationSubmissionContext.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * @return the number of max attempts of the application to be submitted
 */
@Public
@Stable
public abstract int getMaxAppAttempts();
 
Example 11
Source Project: hadoop   Source File: RegisterApplicationMasterResponse.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * <p>Set the queue that the application was placed in.<p>
 */
@Public
@Stable
public abstract void setQueue(String queue);
 
Example 12
Source Project: hadoop   Source File: GetDelegationTokenRequest.java    License: Apache License 2.0 4 votes vote down vote up
@Public
@Stable
public abstract void setRenewer(String renewer);
 
Example 13
Source Project: hadoop   Source File: ApplicationSubmissionContext.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * @param value true if RM should not manage the AM
 */
@Public
@Stable
public abstract void setUnmanagedAM(boolean value);
 
Example 14
Source Project: hadoop   Source File: YarnScheduler.java    License: Apache License 2.0 3 votes vote down vote up
/**
 * 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);
 
Example 15
Source Project: hadoop   Source File: ApplicationClientProtocol.java    License: Apache License 2.0 3 votes vote down vote up
/**
 * <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;
 
Example 16
Source Project: hadoop   Source File: ApplicationClientProtocol.java    License: Apache License 2.0 3 votes vote down vote up
/**
 * <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;
 
Example 17
Source Project: hadoop   Source File: NodeHealthStatus.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * Is the node healthy?
 * @return <code>true</code> if the node is healthy, else <code>false</code>
 */
@Public
@Stable
public abstract boolean getIsNodeHealthy();
 
Example 18
Source Project: hadoop   Source File: NodeHealthStatus.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * 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();
 
Example 19
Source Project: hadoop   Source File: GetDelegationTokenResponse.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * The Delegation tokens have a identifier which maps to
 * {@link AbstractDelegationTokenIdentifier}.
 *
 */
@Public
@Stable
public abstract Token getRMDelegationToken();
 
Example 20
Source Project: hadoop   Source File: URL.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * Get the host of the URL.
 * @return host of the URL
 */
@Public
@Stable
public abstract String getHost();
 
Example 21
Source Project: hadoop   Source File: YarnScheduler.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * Get acls for queues for current user.
 * @return acls for queues for current user
 */
@Public
@Stable
public List<QueueUserACLInfo> getQueueUserAclInfo();
 
Example 22
Source Project: hadoop   Source File: NodeId.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * 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();
 
Example 23
Source Project: hadoop   Source File: YarnScheduler.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * Get maximum allocatable {@link Resource} at the cluster level.
 * @return maximum allocatable resource
 */
@Public
@Stable
public Resource getMaximumResourceCapability();
 
Example 24
Source Project: hadoop   Source File: YarnScheduler.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * Get maximum allocatable {@link Resource} for the queue specified.
 * @param queueName queue name
 * @return maximum allocatable resource
 */
@Public
@Stable
public Resource getMaximumResourceCapability(String queueName);
 
Example 25
Source Project: hadoop   Source File: ResourceRequest.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * 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);
 
Example 26
Source Project: hadoop   Source File: Token.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * Get the service to which the token is allocated.
 * @return service to which the token is allocated
 */
@Public
@Stable
public abstract String getService();
 
Example 27
Source Project: hadoop   Source File: NodeReport.java    License: Apache License 2.0 2 votes vote down vote up
/** 
 * 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();
 
Example 28
Source Project: hadoop   Source File: ResourceRequest.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * Get the <code>Priority</code> of the request.
 * @return <code>Priority</code> of the request
 */
@Public
@Stable
public abstract Priority getPriority();
 
Example 29
Source Project: hadoop   Source File: GetApplicationsRequest.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * Get the application states to filter applications on
 *
 * @return Set of Application states to filter on
 */
@Public
@Stable
public abstract EnumSet<YarnApplicationState> getApplicationStates();
 
Example 30
Source Project: hadoop   Source File: ContainerManagementProtocol.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * <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;