You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-commits@hadoop.apache.org by ac...@apache.org on 2011/08/30 03:22:30 UTC
svn commit: r1163069 [2/2] - in
/hadoop/common/trunk/hadoop-mapreduce-project: ./
hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/
hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/
hadoop-yarn/ha...
Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationReport.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationReport.java?rev=1163069&r1=1163068&r2=1163069&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationReport.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationReport.java Tue Aug 30 01:22:28 2011
@@ -18,38 +18,172 @@
package org.apache.hadoop.yarn.api.records;
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
+import org.apache.hadoop.yarn.api.ClientRMProtocol;
+
+/**
+ * <p><code>ApplicationReport</code> is a report of an application.</p>
+ *
+ * <p>It includes details such as:
+ * <ul>
+ * <li>{@link ApplicationId} of the application.</li>
+ * <li>Applications user.</li>
+ * <li>Application queue.</li>
+ * <li>Application name.</li>
+ * <li>Host on which the <code>ApplicationMaster</code>is running.</li>
+ * <li>RPC port of the <code>ApplicationMaster</code>.</li>
+ * <li>Tracking URL.</li>
+ * <li>{@link ApplicationState} of the application.</li>
+ * <li>Diagnostic information in case of errors.</li>
+ * <li>Start time of the application.</li>
+ * <li>Client token of the application (if security is enabled).</li>
+ * </ul>
+ * </p>
+ *
+ * @see ClientRMProtocol#getApplicationReport(org.apache.hadoop.yarn.api.protocolrecords.GetApplicationReportRequest)
+ */
+@Public
+@Stable
public interface ApplicationReport {
+ /**
+ * Get the <code>ApplicationId</code> of the application.
+ * @return <code>ApplicationId</code> of the application
+ */
+ @Public
+ @Stable
ApplicationId getApplicationId();
+
+ @Private
+ @Unstable
void setApplicationId(ApplicationId applicationId);
+ /**
+ * Get the <em>user</em> who submitted the application.
+ * @return <em>user</em> who submitted the application
+ */
+ @Public
+ @Stable
String getUser();
+
+ @Private
+ @Unstable
void setUser(String user);
+ /**
+ * Get the <em>queue</em> to which the application was submitted.
+ * @return <em>queue</em> to which the application was submitted
+ */
+ @Public
+ @Stable
String getQueue();
+
+ @Private
+ @Unstable
void setQueue(String queue);
+ /**
+ * Get the user-defined <em>name</em> of the application.
+ * @return <em>name</em> of the application
+ */
+ @Public
+ @Stable
String getName();
+
+ @Private
+ @Unstable
void setName(String name);
+ /**
+ * Get the <em>host</em> on which the <code>ApplicationMaster</code>
+ * is running.
+ * @return <em>host</em> on which the <code>ApplicationMaster</code>
+ * is running
+ */
+ @Public
+ @Stable
String getHost();
+
+ @Private
+ @Unstable
void setHost(String host);
+ /**
+ * Get the <em>RPC port</em> of the <code>ApplicationMaster</code>.
+ * @return <em>RPC port</em> of the <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
int getRpcPort();
+
+ @Private
+ @Unstable
void setRpcPort(int rpcPort);
+ /**
+ * Get the <em>client token</em> for communicating with the
+ * <code>ApplicationMaster</code>.
+ * @return <em>client token</em> for communicating with the
+ * <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
String getClientToken();
+
+ @Private
+ @Unstable
void setClientToken(String clientToken);
+ /**
+ * Get the <code>ApplicationState</code> of the application.
+ * @return <code>ApplicationState</code> of the application
+ */
+ @Public
+ @Stable
ApplicationState getState();
+
+ @Private
+ @Unstable
void setState(ApplicationState state);
+ /**
+ * Get the <em>diagnositic information</em> of the application in case of
+ * errors.
+ * @return <em>diagnositic information</em> of the application in case
+ * of errors
+ */
+ @Public
+ @Stable
String getDiagnostics();
+
+ @Private
+ @Unstable
void setDiagnostics(String diagnostics);
+ /**
+ * Get the <em>tracking url</em> for the application.
+ * @return <em>tracking url</em> for the application
+ */
+ @Public
+ @Stable
String getTrackingUrl();
+
+ @Private
+ @Unstable
void setTrackingUrl(String url);
+ /**
+ * Get the <em>start time</em> of the application.
+ * @return <em>start time</em> of the application
+ */
+ @Public
+ @Stable
long getStartTime();
+
+ @Private
+ @Unstable
void setStartTime(long startTime);
}
Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java?rev=1163069&r1=1163068&r2=1163069&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java Tue Aug 30 01:22:28 2011
@@ -22,68 +22,319 @@ import java.nio.ByteBuffer;
import java.util.List;
import java.util.Map;
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
+import org.apache.hadoop.yarn.api.ClientRMProtocol;
+
+/**
+ * <p><code>ApplicationSubmissionContext</code> represents the all of the
+ * information needed by the <code>ResourceManager</code> to launch
+ * the <code>ApplicationMaster</code> for an application.</p>
+ *
+ * <p>It includes details such as:
+ * <ul>
+ * <li>{@link ApplicationId} of the application.</li>
+ * <li>
+ * {@link Resource} necessary to run the <code>ApplicationMaster</code>.
+ * </li>
+ * <li>Application user.</li>
+ * <li>Application name.</li>
+ * <li>{@link Priority} of the application.</li>
+ * <li>Security tokens (if security is enabled).</li>
+ * <li>
+ * {@link LocalResource} necessary for running the
+ * <code>ApplicationMaster</code> container such
+ * as binaries, jar, shared-objects, side-files etc.
+ * </li>
+ * <li>
+ * Environment variables for the launched <code>ApplicationMaster</code>
+ * process.
+ * </li>
+ * <li>Command to launch the <code>ApplicationMaster</code>.</li>
+ * </ul>
+ * </p>
+ *
+ * @see ClientRMProtocol#submitApplication(org.apache.hadoop.yarn.api.protocolrecords.SubmitApplicationRequest)
+ */
+@Public
+@Stable
public interface ApplicationSubmissionContext {
- public abstract ApplicationId getApplicationId();
- public abstract String getApplicationName();
- public abstract Resource getMasterCapability();
-
- public abstract Map<String, URL> getAllResources();
- public abstract URL getResource(String key);
-
- public abstract Map<String, LocalResource> getAllResourcesTodo();
- public abstract LocalResource getResourceTodo(String key);
-
- public abstract List<String> getFsTokenList();
- public abstract String getFsToken(int index);
- public abstract int getFsTokenCount();
-
- public abstract ByteBuffer getFsTokensTodo();
-
- public abstract Map<String, String> getAllEnvironment();
- public abstract String getEnvironment(String key);
-
- public abstract List<String> getCommandList();
- public abstract String getCommand(int index);
- public abstract int getCommandCount();
-
- public abstract String getQueue();
- public abstract Priority getPriority();
- public abstract String getUser();
+ /**
+ * Get the <code>ApplicationId</code> of the submitted application.
+ * @return <code>ApplicationId</code> of the submitted application
+ */
+ @Public
+ @Stable
+ public ApplicationId getApplicationId();
+
+ /**
+ * Set the <code>ApplicationId</code> of the submitted application.
+ * @param appplicationId <code>ApplicationId</code> of the submitted
+ * application
+ */
+ @Public
+ @Stable
+ public void setApplicationId(ApplicationId appplicationId);
-
-
- public abstract void setApplicationId(ApplicationId appplicationId);
- public abstract void setApplicationName(String applicationName);
- public abstract void setMasterCapability(Resource masterCapability);
-
- public abstract void addAllResources(Map<String, URL> resources);
- public abstract void setResource(String key, URL url);
- public abstract void removeResource(String key);
- public abstract void clearResources();
-
- public abstract void addAllResourcesTodo(Map<String, LocalResource> resourcesTodo);
- public abstract void setResourceTodo(String key, LocalResource localResource);
- public abstract void removeResourceTodo(String key);
- public abstract void clearResourcesTodo();
-
- public abstract void addAllFsTokens(List<String> fsTokens);
- public abstract void addFsToken(String fsToken);
- public abstract void removeFsToken(int index);
- public abstract void clearFsTokens();
-
- public abstract void setFsTokensTodo(ByteBuffer fsTokensTodo);
-
- public abstract void addAllEnvironment(Map<String, String> environment);
- public abstract void setEnvironment(String key, String env);
- public abstract void removeEnvironment(String key);
- public abstract void clearEnvironment();
-
- public abstract void addAllCommands(List<String> commands);
- public abstract void addCommand(String command);
- public abstract void removeCommand(int index);
- public abstract void clearCommands();
-
- public abstract void setQueue(String queue);
- public abstract void setPriority(Priority priority);
- public abstract void setUser(String user);
+ /**
+ * Get the application <em>name</em>.
+ * @return application name
+ */
+ @Public
+ @Stable
+ public String getApplicationName();
+
+ /**
+ * Set the application <em>name</em>.
+ * @param applicationName application name
+ */
+ @Public
+ @Stable
+ public void setApplicationName(String applicationName);
+
+ /**
+ * Get the <em>queue</em> to which the application is being submitted.
+ * @return <em>queue</em> to which the application is being submitted
+ */
+ @Public
+ @Stable
+ public String getQueue();
+
+ /**
+ * Set the <em>queue</em> to which the application is being submitted
+ * @param queue <em>queue</em> to which the application is being submitted
+ */
+ @Public
+ @Stable
+ public void setQueue(String queue);
+
+ /**
+ * Get the <code>Priority</code> of the application.
+ * @return <code>Priority</code> of the application
+ */
+ @Public
+ @Stable
+ public Priority getPriority();
+
+ /**
+ * Set the <code>Priority</code> of the application.
+ * @param priority <code>Priority</code> of the application
+ */
+ @Public
+ @Stable
+ public void setPriority(Priority priority);
+
+ /**
+ * Get the <em>user</em> submitting the application.
+ * @return <em>user</em> submitting the application
+ */
+ @Public
+ @Stable
+ public String getUser();
+
+ /**
+ * Set the <em>user</em> submitting the application.
+ * @param user <em>user</em> submitting the application
+ */
+ @Public
+ @Stable
+ public void setUser(String user);
+
+ /**
+ * Get the <code>Resource</code> required to run the
+ * <code>ApplicationMaster</code>.
+ * @return <code>Resource</code> required to run the
+ * <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
+ public Resource getMasterCapability();
+
+ /**
+ * Set <code>Resource</code> required to run the
+ * <code>ApplicationMaster</code>.
+ * @param masterCapability <code>Resource</code> required to run the
+ * <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
+ public void setMasterCapability(Resource masterCapability);
+
+ @Private
+ @Unstable
+ public Map<String, URL> getAllResources();
+
+ @Private
+ @Unstable
+ public URL getResource(String key);
+
+ @Private
+ @Unstable
+ public void addAllResources(Map<String, URL> resources);
+
+ @Private
+ @Unstable
+ public void setResource(String key, URL url);
+
+ @Private
+ @Unstable
+ public void removeResource(String key);
+
+ @Private
+ @Unstable
+ public void clearResources();
+
+ /**
+ * Get all the <code>LocalResource</code> required to run the
+ * <code>ApplicationMaster</code>.
+ * @return <code>LocalResource</code> required to run the
+ * <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
+ public Map<String, LocalResource> getAllResourcesTodo();
+
+ @Private
+ @Unstable
+ public LocalResource getResourceTodo(String key);
+
+ /**
+ * Add all the <code>LocalResource</code> required to run the
+ * <code>ApplicationMaster</code>.
+ * @param resources all <code>LocalResource</code> required to run the
+ * <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
+ public void addAllResourcesTodo(Map<String, LocalResource> resources);
+
+ @Private
+ @Unstable
+ public void setResourceTodo(String key, LocalResource localResource);
+
+ @Private
+ @Unstable
+ public void removeResourceTodo(String key);
+
+ @Private
+ @Unstable
+ public void clearResourcesTodo();
+
+ @Private
+ @Unstable
+ public List<String> getFsTokenList();
+
+ @Private
+ @Unstable
+ public String getFsToken(int index);
+
+ @Private
+ @Unstable
+ public int getFsTokenCount();
+
+ @Private
+ @Unstable
+ public void addAllFsTokens(List<String> fsTokens);
+
+ @Private
+ @Unstable
+ public void addFsToken(String fsToken);
+
+ @Private
+ @Unstable
+ public void removeFsToken(int index);
+
+ @Private
+ @Unstable
+ public void clearFsTokens();
+
+ /**
+ * Get <em>file-system tokens</em> for the <code>ApplicationMaster</code>.
+ * @return file-system tokens for the <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
+ public ByteBuffer getFsTokensTodo();
+
+ /**
+ * Set <em>file-system tokens</em> for the <code>ApplicationMaster</code>.
+ * @param fsTokens file-system tokens for the <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
+ public void setFsTokensTodo(ByteBuffer fsTokens);
+
+ /**
+ * Get the <em>environment variables</em> for the
+ * <code>ApplicationMaster</code>.
+ * @return environment variables for the <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
+ public Map<String, String> getAllEnvironment();
+
+ @Private
+ @Unstable
+ public String getEnvironment(String key);
+
+ /**
+ * Add all of the <em>environment variables</em> for the
+ * <code>ApplicationMaster</code>.
+ * @param environment environment variables for the
+ * <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
+ public void addAllEnvironment(Map<String, String> environment);
+
+ @Private
+ @Unstable
+ public void setEnvironment(String key, String env);
+
+ @Private
+ @Unstable
+ public void removeEnvironment(String key);
+
+ @Private
+ @Unstable
+ public void clearEnvironment();
+
+ /**
+ * Get the <em>commands</em> to launch the <code>ApplicationMaster</code>.
+ * @return commands to launch the <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
+ public List<String> getCommandList();
+
+ @Private
+ @Unstable
+ public String getCommand(int index);
+
+ @Private
+ @Unstable
+ public int getCommandCount();
+
+ /**
+ * Add all of the <em>commands</em> to launch the
+ * <code>ApplicationMaster</code>.
+ * @param commands commands to launch the <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
+ public void addAllCommands(List<String> commands);
+
+ @Private
+ @Unstable
+ public void addCommand(String command);
+
+ @Private
+ @Unstable
+ public void removeCommand(int index);
+
+ @Private
+ @Unstable
+ public void clearCommands();
}
\ No newline at end of file
Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerLaunchContext.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerLaunchContext.java?rev=1163069&r1=1163068&r2=1163069&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerLaunchContext.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerLaunchContext.java Tue Aug 30 01:22:28 2011
@@ -26,6 +26,7 @@ import org.apache.hadoop.classification.
import org.apache.hadoop.classification.InterfaceAudience.Public;
import org.apache.hadoop.classification.InterfaceStability.Stable;
import org.apache.hadoop.classification.InterfaceStability.Unstable;
+import org.apache.hadoop.yarn.api.ContainerManager;
/**
* <p><code>ContainerLaunchContext</code> represents the all of the information
@@ -43,17 +44,11 @@ import org.apache.hadoop.classification.
* </li>
* <li>Optional, application-specific binary service data.</li>
* <li>Environment variables for the launched process.</li>
- * <li>Command to be executed to launch the container.</li>
- * <li></li>
- * <li></li>
- * <li></li>
- * <li></li>
- * <li></li>
- * <li></li>
- * <li></li>
- * <li></li>
+ * <li>Command to launch the container.</li>
* </ul>
* </p>
+ *
+ * @see ContainerManager#startContainer(org.apache.hadoop.yarn.api.protocolrecords.StartContainerRequest)
*/
@Public
@Stable
@@ -66,8 +61,12 @@ public interface ContainerLaunchContext
@Stable
ContainerId getContainerId();
- @Private
- @Unstable
+ /**
+ * Set <code>ContainerId</code> of container to be launched.
+ * @param containerId et <code>ContainerId</code> of container to be launched
+ */
+ @Public
+ @Stable
void setContainerId(ContainerId containerId);
/**
@@ -78,8 +77,12 @@ public interface ContainerLaunchContext
@Stable
String getUser();
- @Private
- @Unstable
+ /**
+ * Set the <em>user</em> to whom the container has been allocated
+ * @param user <em>user</em> to whom the container has been allocated
+ */
+ @Public
+ @Stable
void setUser(String user);
/**
@@ -91,9 +94,14 @@ public interface ContainerLaunchContext
@Public
@Stable
Resource getResource();
-
- @Private
- @Unstable
+
+ /**
+ * Set the <code>Resource</code> allocated to the container by the
+ * <code>ResourceManager</code>.
+ * @param resource allocated resource
+ */
+ @Public
+ @Stable
void setResource(Resource resource);
/**
@@ -104,8 +112,12 @@ public interface ContainerLaunchContext
@Stable
ByteBuffer getContainerTokens();
- @Private
- @Unstable
+ /**
+ * Set security tokens (if security is enabled).
+ * @param containerToken security tokens
+ */
+ @Public
+ @Stable
void setContainerTokens(ByteBuffer containerToken);
/**
@@ -119,9 +131,13 @@ public interface ContainerLaunchContext
@Private
@Unstable
LocalResource getLocalResource(String key);
-
- @Private
- @Unstable
+
+ /**
+ * Add all <code>LocalResource</code> required by the container.
+ * @param localResources <code>LocalResource</code> required by the container
+ */
+ @Public
+ @Stable
void addAllLocalResources(Map<String, LocalResource> localResources);
@Private
@@ -147,9 +163,13 @@ public interface ContainerLaunchContext
@Private
@Unstable
ByteBuffer getServiceData(String key);
-
- @Private
- @Unstable
+
+ /**
+ * Add add application-specific binary service data.
+ * @param serviceData application-specific binary service data
+ */
+ @Public
+ @Stable
void addAllServiceData(Map<String, ByteBuffer> serviceData);
@Private
@@ -176,8 +196,12 @@ public interface ContainerLaunchContext
@Unstable
String getEnv(String key);
- @Private
- @Unstable
+ /**
+ * Add <em>environment variables</em> for the launched container.
+ * @param env <em>environment variables</em> for the launched container
+ */
+ @Public
+ @Stable
void addAllEnv(Map<String, String> env);
@Private
@@ -208,8 +232,12 @@ public interface ContainerLaunchContext
@Unstable
int getCommandCount();
- @Private
- @Unstable
+ /**
+ * Add the list of <em>commands</em> for launching the container.
+ * @param commands the list of <em>commands</em> for launching the container
+ */
+ @Public
+ @Stable
void addAllCommands(List<String> commands);
@Private
Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResource.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResource.java?rev=1163069&r1=1163068&r2=1163069&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResource.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResource.java Tue Aug 30 01:22:28 2011
@@ -18,16 +18,92 @@
package org.apache.hadoop.yarn.api.records;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.yarn.api.ContainerManager;
+
+/**
+ * <p><code>LocalResource</code> represents a local resource required to
+ * run a container.</p>
+ *
+ * <p>The <code>NodeManager</code> is responsible for localizing the resource
+ * prior to launching the container.</p>
+ *
+ * <p>Applications can specify {@link LocalResourceType} and
+ * {@link LocalResourceVisibility}.</p>
+ *
+ * @see LocalResourceType
+ * @see LocalResourceVisibility
+ * @see ContainerLaunchContext
+ * @see ApplicationSubmissionContext
+ * @see ContainerManager#startContainer(org.apache.hadoop.yarn.api.protocolrecords.StartContainerRequest)
+ */
+@Public
+@Stable
public interface LocalResource {
- public abstract URL getResource();
- public abstract long getSize();
- public abstract long getTimestamp();
- public abstract LocalResourceType getType();
- public abstract LocalResourceVisibility getVisibility();
-
- public abstract void setResource(URL resource);
- public abstract void setSize(long size);
- public abstract void setTimestamp(long timestamp);
- public abstract void setType(LocalResourceType type);
- public abstract void setVisibility(LocalResourceVisibility visibility);
+ /**
+ * Get the <em>location</em> of the resource to be localized.
+ * @return <em>location</em> of the resource to be localized
+ */
+ public URL getResource();
+
+ /**
+ * Set <em>location</em> of the resource to be localized.
+ * @param resource <em>location</em> of the resource to be localized
+ */
+ public void setResource(URL resource);
+
+ /**
+ * Get the <em>size</em> of the resource to be localized.
+ * @return <em>size</em> of the resource to be localized
+ */
+ public long getSize();
+
+ /**
+ * Set the <em>size</em> of the resource to be localized.
+ * @param size <em>size</em> of the resource to be localized
+ */
+ public void setSize(long size);
+
+ /**
+ * Get the original <em>timestamp</em> of the resource to be localized, used
+ * for verification.
+ * @return <em>timestamp</em> of the resource to be localized
+ */
+ public long getTimestamp();
+
+ /**
+ * Set the <em>timestamp</em> of the resource to be localized, used
+ * for verification.
+ * @param timestamp <em>timestamp</em> of the resource to be localized
+ */
+ public void setTimestamp(long timestamp);
+
+ /**
+ * Get the <code>LocalResourceType</code> of the resource to be localized.
+ * @return <code>LocalResourceType</code> of the resource to be localized
+ */
+ public LocalResourceType getType();
+
+ /**
+ * Set the <code>LocalResourceType</code> of the resource to be localized.
+ * @param type <code>LocalResourceType</code> of the resource to be localized
+ */
+ public void setType(LocalResourceType type);
+
+ /**
+ * Get the <code>LocalResourceVisibility</code> of the resource to be
+ * localized.
+ * @return <code>LocalResourceVisibility</code> of the resource to be
+ * localized
+ */
+ public LocalResourceVisibility getVisibility();
+
+ /**
+ * Set the <code>LocalResourceVisibility</code> of the resource to be
+ * localized.
+ * @param visibility <code>LocalResourceVisibility</code> of the resource to be
+ * localized
+ */
+ public void setVisibility(LocalResourceVisibility visibility);
}
Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResourceType.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResourceType.java?rev=1163069&r1=1163068&r2=1163069&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResourceType.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResourceType.java Tue Aug 30 01:22:28 2011
@@ -18,6 +18,42 @@
package org.apache.hadoop.yarn.api.records;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.yarn.api.ContainerManager;
+
+/**
+ * <p><code>LocalResourceType</code> specifies the <em>type</em>
+ * of a resource localized by the <code>NodeManager</code>.</p>
+ *
+ * <p>The <em>type</em> can be one of:
+ * <ul>
+ * <li>
+ * {@link #FILE} - Regular file i.e. uninterpreted bytes.
+ * </li>
+ * <li>
+ * {@link #ARCHIVE} - Archive, which is automatically unarchived by the
+ * <code>NodeManager</code>.
+ * </li>
+ * </ul>
+ * </p>
+ *
+ * @see LocalResource
+ * @see ContainerLaunchContext
+ * @see ApplicationSubmissionContext
+ * @see ContainerManager#startContainer(org.apache.hadoop.yarn.api.protocolrecords.StartContainerRequest)
+ */
+@Public
+@Stable
public enum LocalResourceType {
- ARCHIVE, FILE
+
+ /**
+ * Archive, which is automatically unarchived by the <code>NodeManager</code>.
+ */
+ ARCHIVE,
+
+ /**
+ * Regular file i.e. uninterpreted bytes.
+ */
+ FILE
}
Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResourceVisibility.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResourceVisibility.java?rev=1163069&r1=1163068&r2=1163069&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResourceVisibility.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResourceVisibility.java Tue Aug 30 01:22:28 2011
@@ -18,6 +18,48 @@
package org.apache.hadoop.yarn.api.records;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.yarn.api.ContainerManager;
+
+/**
+ * <p><code>LocalResourceVisibility</code> specifies the <em>visibility</em>
+ * of a resource localized by the <code>NodeManager</code>.</p>
+ *
+ * <p>The <em>visibility</em> can be one of:
+ * <ul>
+ * <li>{@link #PUBLIC} - Shared by all users on the node.</li>
+ * <li>
+ * {@link #PRIVATE} - Shared among all applications of the
+ * <em>same user</em> on the node.
+ * </li>
+ * <li>
+ * {@link #APPLICATION} - Shared only among containers of the
+ * <em>same application</em> on the node.
+ * </li>
+ * </ul>
+ * </p>
+ *
+ * @see LocalResource
+ * @see ContainerLaunchContext
+ * @see ApplicationSubmissionContext
+ * @see ContainerManager#startContainer(org.apache.hadoop.yarn.api.protocolrecords.StartContainerRequest)
+ */
+@Public
+@Stable
public enum LocalResourceVisibility {
- PUBLIC, PRIVATE, APPLICATION
+ /**
+ * Shared by all users on the node.
+ */
+ PUBLIC,
+
+ /**
+ * Shared among all applications of the <em>same user</em> on the node.
+ */
+ PRIVATE,
+
+ /**
+ * Shared only among containers of the <em>same application</em> on the node.
+ */
+ APPLICATION
}
Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeHealthStatus.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeHealthStatus.java?rev=1163069&r1=1163068&r2=1163069&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeHealthStatus.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeHealthStatus.java Tue Aug 30 01:22:28 2011
@@ -17,17 +17,69 @@
*/
package org.apache.hadoop.yarn.api.records;
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
+import org.apache.hadoop.yarn.api.ClientRMProtocol;
+
+/**
+ * <p><code>NodeHealthStatus</code> is a summary of the health status of the
+ * node.</p>
+ *
+ * <p>It includes information such as:
+ * <ul>
+ * <li>
+ * An indicator of whether the node is healthy, as determined by the
+ * health-check script.
+ * </li>
+ * <li>The previous time at which the health status was reported.</li>
+ * <li>A diagnostic report on the health status.</li>
+ * <li></li>
+ * <li></li>
+ * </ul>
+ * </p>
+ *
+ * @see NodeReport
+ * @see ClientRMProtocol#getClusterNodes(org.apache.hadoop.yarn.api.protocolrecords.GetClusterNodesRequest)
+ */
+@Public
+@Stable
public interface NodeHealthStatus {
+ /**
+ * Is the node healthy?
+ * @return <code>true</code> if the node is healthy, else <code>false</code>
+ */
+ @Public
+ @Stable
boolean getIsNodeHealthy();
- String getHealthReport();
-
- long getLastHealthReportTime();
-
+ @Private
+ @Unstable
void setIsNodeHealthy(boolean isNodeHealthy);
+ /**
+ * Get the <em>diagnostic health report</em> of the node.
+ * @return <em>diagnostic health report</em> of the node
+ */
+ @Public
+ @Stable
+ String getHealthReport();
+
+ @Private
+ @Unstable
void setHealthReport(String healthReport);
+ /**
+ * Get the <em>last timestamp</em> at which the health report was received.
+ * @return <em>last timestamp</em> at which the health report was received
+ */
+ @Public
+ @Stable
+ long getLastHealthReportTime();
+
+ @Private
+ @Unstable
void setLastHealthReportTime(long lastHealthReport);
}
\ No newline at end of file
Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeReport.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeReport.java?rev=1163069&r1=1163068&r2=1163069&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeReport.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeReport.java Tue Aug 30 01:22:28 2011
@@ -18,19 +18,113 @@
package org.apache.hadoop.yarn.api.records;
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
+import org.apache.hadoop.yarn.api.ClientRMProtocol;
+
+/**
+ * <p><code>NodeReport</code> is a summary of runtime information of a
+ * node in the cluster.</p>
+ *
+ * <p>It includes details such as:
+ * <ul>
+ * <li>{@link NodeId} of the node.</li>
+ * <li>HTTP Tracking URL of the node.</li>
+ * <li>Rack name for the node.</li>
+ * <li>Used {@link Resource} on the node.</li>
+ * <li>Total available {@link Resource} of the node.</li>
+ * <li>Number of running containers on the node.</li>
+ * <li>{@link NodeHealthStatus} of the node.</li>
+ * </ul>
+ * </p>
+ *
+ * @see NodeHealthStatus
+ * @see ClientRMProtocol#getClusterNodes(org.apache.hadoop.yarn.api.protocolrecords.GetClusterNodesRequest)
+ */
+@Public
+@Stable
public interface NodeReport {
+ /**
+ * Get the <code>NodeId</code> of the node.
+ * @return <code>NodeId</code> of the node
+ */
NodeId getNodeId();
+
+ @Private
+ @Unstable
void setNodeId(NodeId nodeId);
+
+ /**
+ * Get the <em>http address</em> of the node.
+ * @return <em>http address</em> of the node
+ */
+ @Public
+ @Stable
String getHttpAddress();
+
+ @Private
+ @Unstable
void setHttpAddress(String httpAddress);
+
+ /**
+ * Get the <em>rack name</em> for the node.
+ * @return <em>rack name</em> for the node
+ */
+ @Public
+ @Stable
String getRackName();
+
+ @Private
+ @Unstable
void setRackName(String rackName);
+
+ /**
+ * Get <em>used</em> <code>Resource</code> on the node.
+ * @return <em>used</em> <code>Resource</code> on the node
+ */
+ @Public
+ @Stable
Resource getUsed();
+
+ @Private
+ @Unstable
void setUsed(Resource used);
+
+ /**
+ * Get the <em>total</em> <code>Resource</code> on the node.
+ * @return <em>total</em> <code>Resource</code> on the node
+ */
+ @Public
+ @Stable
Resource getCapability();
+
+ @Private
+ @Unstable
void setCapability(Resource capability);
+
+ /**
+ * Get the <em>number of running containers</em> on the node.
+ * @return <em>number of running containers</em> on the node
+ */
+ @Public
+ @Stable
int getNumContainers();
+
+ @Private
+ @Unstable
void setNumContainers(int numContainers);
+
+ /**
+ * Get the <code>NodeHealthStatus</code> of the node.
+ * @return <code>NodeHealthStatus</code> of the node
+ */
+ @Public
+ @Stable
NodeHealthStatus getNodeHealthStatus();
+
+ @Private
+ @Unstable
void setNodeHealthStatus(NodeHealthStatus nodeHealthStatus);
}
Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueACL.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueACL.java?rev=1163069&r1=1163068&r2=1163069&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueACL.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueACL.java Tue Aug 30 01:22:28 2011
@@ -18,8 +18,39 @@
package org.apache.hadoop.yarn.api.records;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.yarn.api.ClientRMProtocol;
+
+/**
+ * <p><code>QueueACL</code> enumerates the various ACLs for queues.</p>
+ *
+ * <p>The ACLs are one of:
+ * <ul>
+ * <li>{@link #SUBMIT_JOB} - ACL to submit jobs to the queue.</li>
+ * <li>{@link #ADMINISTER_QUEUE} - ACL to administer the queue.</li>
+ * <li>{@link #ADMINISTER_JOBS} - ACL to administer jobs in the queue.</li>
+ * </ul>
+ * </p>
+ *
+ * @see QueueInfo
+ * @see ClientRMProtocol#getQueueUserAcls(org.apache.hadoop.yarn.api.protocolrecords.GetQueueUserAclsInfoRequest)
+ */
+@Public
+@Stable
public enum QueueACL {
+ /**
+ * ACL to submit jobs to the queue.
+ */
SUBMIT_JOB,
+
+ /**
+ * ACL to administer the queue.
+ */
ADMINISTER_QUEUE,
+
+ /**
+ * ACL to administer jobs in the queue.
+ */
ADMINISTER_JOBS; // currently unused
}
\ No newline at end of file
Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueInfo.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueInfo.java?rev=1163069&r1=1163068&r2=1163069&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueInfo.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueInfo.java Tue Aug 30 01:22:28 2011
@@ -20,25 +20,114 @@ package org.apache.hadoop.yarn.api.recor
import java.util.List;
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
+import org.apache.hadoop.yarn.api.ClientRMProtocol;
+
+/**
+ * <p>QueueInfo</p> is a report of the runtime information of the queue.</p>
+ *
+ * <p>It includes information such as:
+ * <ul>
+ * <li>Queue name.</li>
+ * <li>Capacity of the queue.</li>
+ * <li>Maximum capacity of the queue.</li>
+ * <li>Current capacity of the queue.</li>
+ * <li>Child queues.</li>
+ * <li>Running applications.</li>
+ * <li>{@link QueueState} of the queue.</li>
+ * </ul>
+ * </p>
+ *
+ * @see QueueState
+ * @see ClientRMProtocol#getQueueInfo(org.apache.hadoop.yarn.api.protocolrecords.GetQueueInfoRequest)
+ */
+@Public
+@Stable
public interface QueueInfo {
+ /**
+ * Get the <em>name</em> of the queue.
+ * @return <em>name</em> of the queue
+ */
+ @Public
+ @Stable
String getQueueName();
+
+ @Private
+ @Unstable
void setQueueName(String queueName);
+ /**
+ * Get the <em>configured capacity</em> of the queue.
+ * @return <em>configured capacity</em> of the queue
+ */
+ @Public
+ @Stable
float getCapacity();
+
+ @Private
+ @Unstable
void setCapacity(float capacity);
+ /**
+ * Get the <em>maximum capacity</em> of the queue.
+ * @return <em>maximum capacity</em> of the queue
+ */
+ @Public
+ @Stable
float getMaximumCapacity();
+
+ @Private
+ @Unstable
void setMaximumCapacity(float maximumCapacity);
+ /**
+ * Get the <em>current capacity</em> of the queue.
+ * @return <em>current capacity</em> of the queue
+ */
+ @Public
+ @Stable
float getCurrentCapacity();
+
+ @Private
+ @Unstable
void setCurrentCapacity(float currentCapacity);
+ /**
+ * Get the <em>child queues</em> of the queue.
+ * @return <em>child queues</em> of the queue
+ */
+ @Public
+ @Stable
List<QueueInfo> getChildQueues();
+
+ @Private
+ @Unstable
void setChildQueues(List<QueueInfo> childQueues);
+ /**
+ * Get the <em>running applications</em> of the queue.
+ * @return <em>running applications</em> of the queue
+ */
+ @Public
+ @Stable
List<ApplicationReport> getApplications();
+
+ @Private
+ @Unstable
void setApplications(List<ApplicationReport> applications);
+ /**
+ * Get the <code>QueueState</code> of the queue.
+ * @return <code>QueueState</code> of the queue
+ */
+ @Public
+ @Stable
QueueState getQueueState();
+
+ @Private
+ @Unstable
void setQueueState(QueueState queueState);
}
Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueState.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueState.java?rev=1163069&r1=1163068&r2=1163069&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueState.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueState.java Tue Aug 30 01:22:28 2011
@@ -18,10 +18,33 @@
package org.apache.hadoop.yarn.api.records;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.yarn.api.ClientRMProtocol;
+
/**
- * State of a Queue
+ * <p>State of a Queue.</p>
+ *
+ * <p>A queue is one of:
+ * <ul>
+ * <li>{@link #RUNNING} - normal state.</li>
+ * <li>{@link #STOPPED} - not accepting new application submissions.
+ * </ul>
+ * </p>
+ *
+ * @see QueueInfo
+ * @see ClientRMProtocol#getQueueInfo(org.apache.hadoop.yarn.api.protocolrecords.GetQueueInfoRequest)
*/
+@Public
+@Stable
public enum QueueState {
- STOPPED,
+ /**
+ * Stopped - Not accepting submissions of new applications.
+ */
+ STOPPED,
+
+ /**
+ * Running - normal operation.
+ */
RUNNING
}
\ No newline at end of file
Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueUserACLInfo.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueUserACLInfo.java?rev=1163069&r1=1163068&r2=1163069&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueUserACLInfo.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueUserACLInfo.java Tue Aug 30 01:22:28 2011
@@ -20,10 +20,43 @@ package org.apache.hadoop.yarn.api.recor
import java.util.List;
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
+import org.apache.hadoop.yarn.api.ClientRMProtocol;
+
+/**
+ * <p><code>QueueUserACLInfo</code> provides information {@link QueueACL} for
+ * the given user.</p>
+ *
+ * @see QueueACL
+ * @see ClientRMProtocol#getQueueUserAcls(org.apache.hadoop.yarn.api.protocolrecords.GetQueueUserAclsInfoRequest)
+ */
+@Public
+@Stable
public interface QueueUserACLInfo {
+ /**
+ * Get the <em>queue name</em> of the queue.
+ * @return <em>queue name</em> of the queue
+ */
+ @Public
+ @Stable
String getQueueName();
- void setQueueName(String queueName);
+ @Private
+ @Unstable
+ void setQueueName(String queueName);
+
+ /**
+ * Get the list of <code>QueueACL</code> for the given user.
+ * @return list of <code>QueueACL</code> for the given user
+ */
+ @Public
+ @Stable
List<QueueACL> getUserAcls();
+
+ @Private
+ @Unstable
void setUserAcls(List<QueueACL> acls);
}