hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acmur...@apache.org
Subject svn commit: r1166955 [2/4] - in /hadoop/common/trunk/hadoop-mapreduce-project: ./ hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapred/ hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/h...
Date Fri, 09 Sep 2011 01:45:02 GMT
Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/YARNRunner.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/YARNRunner.java?rev=1166955&r1=1166954&r2=1166955&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/YARNRunner.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/YARNRunner.java Fri Sep  9 01:44:58 2011
@@ -59,7 +59,6 @@ import org.apache.hadoop.mapreduce.Clust
 import org.apache.hadoop.mapreduce.filecache.DistributedCache;
 import org.apache.hadoop.mapreduce.protocol.ClientProtocol;
 import org.apache.hadoop.mapreduce.security.token.delegation.DelegationTokenIdentifier;
-import org.apache.hadoop.mapreduce.v2.ClientConstants;
 import org.apache.hadoop.mapreduce.v2.MRConstants;
 import org.apache.hadoop.mapreduce.v2.jobhistory.JobHistoryUtils;
 import org.apache.hadoop.mapreduce.v2.util.MRApps;
@@ -93,10 +92,6 @@ public class YARNRunner implements Clien
 
   private static final Log LOG = LogFactory.getLog(YARNRunner.class);
 
-  public static final String YARN_AM_VMEM_MB =
-      "yarn.am.mapreduce.resource.mb";
-  private static final int DEFAULT_YARN_AM_VMEM_MB = 2048;
-  
   private final RecordFactory recordFactory = RecordFactoryProvider.getRecordFactory(null);
   private ResourceMgrDelegate resMgrDelegate;
   private ClientCache clientCache;
@@ -273,7 +268,8 @@ public class YARNRunner implements Clien
     ApplicationId applicationId = resMgrDelegate.getApplicationId();
     appContext.setApplicationId(applicationId);
     Resource capability = recordFactory.newRecordInstance(Resource.class);
-    capability.setMemory(conf.getInt(YARN_AM_VMEM_MB, DEFAULT_YARN_AM_VMEM_MB));
+    capability.setMemory(conf.getInt(MRJobConfig.MR_AM_VMEM_MB,
+        MRJobConfig.DEFAULT_MR_AM_VMEM_MB));
     LOG.info("AppMaster capability = " + capability);
     appContext.setMasterCapability(capability);
 
@@ -334,11 +330,11 @@ public class YARNRunner implements Clien
     Vector<CharSequence> vargs = new Vector<CharSequence>(8);
     vargs.add(javaHome + "/bin/java");
     vargs.add("-Dhadoop.root.logger="
-        + conf.get(ClientConstants.MR_APPMASTER_LOG_OPTS,
-            ClientConstants.DEFAULT_MR_APPMASTER_LOG_OPTS) + ",console");
+        + conf.get(MRJobConfig.MR_AM_LOG_OPTS,
+            MRJobConfig.DEFAULT_MR_AM_LOG_OPTS) + ",console");
     
-    vargs.add(conf.get(ClientConstants.MR_APPMASTER_COMMAND_OPTS,
-        ClientConstants.DEFAULT_MR_APPMASTER_COMMAND_OPTS));
+    vargs.add(conf.get(MRJobConfig.MR_AM_COMMAND_OPTS,
+        MRJobConfig.DEFAULT_MR_AM_COMMAND_OPTS));
 
     // Add { job jar, MR app jar } to classpath.
     Map<String, String> environment = new HashMap<String, String>();

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestClientRedirect.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestClientRedirect.java?rev=1166955&r1=1166954&r2=1166955&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestClientRedirect.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestClientRedirect.java Fri Sep  9 01:44:58 2011
@@ -21,7 +21,6 @@ package org.apache.hadoop.mapred;
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
 import java.net.UnknownHostException;
-import java.util.ArrayList;
 import java.util.Iterator;
 
 import junit.framework.Assert;
@@ -64,8 +63,7 @@ import org.apache.hadoop.mapreduce.v2.ap
 import org.apache.hadoop.mapreduce.v2.api.records.JobId;
 import org.apache.hadoop.mapreduce.v2.api.records.JobReport;
 import org.apache.hadoop.mapreduce.v2.api.records.JobState;
-import org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptCompletionEvent;
-import org.apache.hadoop.mapreduce.v2.jobhistory.JHConfig;
+import org.apache.hadoop.mapreduce.v2.jobhistory.JHAdminConfig;
 import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem;
 import org.apache.hadoop.net.NetUtils;
 import org.apache.hadoop.yarn.YarnException;
@@ -122,8 +120,8 @@ public class TestClientRedirect {
     
     Configuration conf = new YarnConfiguration();
     conf.set(MRConfig.FRAMEWORK_NAME, "yarn");
-    conf.set(YarnConfiguration.APPSMANAGER_ADDRESS, RMADDRESS);
-    conf.set(JHConfig.HS_BIND_ADDRESS, HSHOSTADDRESS);
+    conf.set(YarnConfiguration.RM_ADDRESS, RMADDRESS);
+    conf.set(JHAdminConfig.MR_HISTORY_ADDRESS, HSHOSTADDRESS);
     RMService rmService = new RMService("test");
     rmService.init(conf);
     rmService.start();

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/MiniMRYarnCluster.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/MiniMRYarnCluster.java?rev=1166955&r1=1166954&r2=1166955&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/MiniMRYarnCluster.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/MiniMRYarnCluster.java Fri Sep  9 01:44:58 2011
@@ -29,11 +29,10 @@ import org.apache.hadoop.mapreduce.MRCon
 import org.apache.hadoop.mapreduce.MRJobConfig;
 import org.apache.hadoop.mapreduce.v2.hs.JobHistoryServer;
 import org.apache.hadoop.yarn.YarnException;
+import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.apache.hadoop.yarn.server.MiniYARNCluster;
 import org.apache.hadoop.yarn.server.nodemanager.ContainerExecutor;
 import org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor;
-import org.apache.hadoop.yarn.server.nodemanager.NMConfig;
-import org.apache.hadoop.yarn.server.nodemanager.containermanager.AuxServices;
 import org.apache.hadoop.yarn.service.AbstractService;
 import org.apache.hadoop.yarn.service.Service;
 
@@ -62,19 +61,21 @@ public class MiniMRYarnCluster extends M
   public void init(Configuration conf) {
     conf.set(MRConfig.FRAMEWORK_NAME, "yarn");
     conf.set(MRJobConfig.USER_NAME, System.getProperty("user.name"));
-    conf.set(MRConstants.APPS_STAGING_DIR_KEY, new File(getTestWorkDir(),
+    conf.set(MRJobConfig.MR_AM_STAGING_DIR, new File(getTestWorkDir(),
         "apps_staging_dir/${user.name}/").getAbsolutePath());
     conf.set(MRConfig.MASTER_ADDRESS, "test"); // The default is local because of
                                              // which shuffle doesn't happen
     //configure the shuffle service in NM
-    conf.setStrings(AuxServices.AUX_SERVICES,
+    conf.setStrings(YarnConfiguration.NM_AUX_SERVICES,
         new String[] { ShuffleHandler.MAPREDUCE_SHUFFLE_SERVICEID });
-    conf.setClass(String.format(AuxServices.AUX_SERVICE_CLASS_FMT,
+    conf.setClass(String.format(YarnConfiguration.NM_AUX_SERVICE_FMT,
         ShuffleHandler.MAPREDUCE_SHUFFLE_SERVICEID), ShuffleHandler.class,
         Service.class);
+
     // Non-standard shuffle port
     conf.setInt(ShuffleHandler.SHUFFLE_PORT_CONFIG_KEY, 8083);
-    conf.setClass(NMConfig.NM_CONTAINER_EXECUTOR_CLASS,
+
+    conf.setClass(YarnConfiguration.NM_CONTAINER_EXECUTOR,
         DefaultContainerExecutor.class, ContainerExecutor.class);
 
     // TestMRJobs is for testing non-uberized operation only; see TestUberAM

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/TestMRJobs.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/TestMRJobs.java?rev=1166955&r1=1166954&r2=1166955&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/TestMRJobs.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/TestMRJobs.java Fri Sep  9 01:44:58 2011
@@ -68,9 +68,6 @@ import org.apache.hadoop.security.UserGr
 import org.apache.hadoop.security.token.Token;
 import org.apache.hadoop.security.token.TokenIdentifier;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
-import org.apache.hadoop.yarn.server.YarnServerConfig;
-import org.apache.hadoop.yarn.server.nodemanager.NMConfig;
-import org.apache.hadoop.yarn.server.resourcemanager.RMConfig;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -335,11 +332,11 @@ public class TestMRJobs {
     mrCluster.getConfig().set(
         CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHENTICATION,
         "kerberos");
-    mrCluster.getConfig().set(RMConfig.RM_KEYTAB, "/etc/krb5.keytab");
-    mrCluster.getConfig().set(NMConfig.NM_KEYTAB, "/etc/krb5.keytab");
-    mrCluster.getConfig().set(YarnConfiguration.RM_SERVER_PRINCIPAL_KEY,
+    mrCluster.getConfig().set(YarnConfiguration.RM_KEYTAB, "/etc/krb5.keytab");
+    mrCluster.getConfig().set(YarnConfiguration.NM_KEYTAB, "/etc/krb5.keytab");
+    mrCluster.getConfig().set(YarnConfiguration.RM_PRINCIPAL,
         "rm/sightbusy-lx@LOCALHOST");
-    mrCluster.getConfig().set(YarnServerConfig.NM_SERVER_PRINCIPAL_KEY,
+    mrCluster.getConfig().set(YarnConfiguration.NM_PRINCIPAL,
         "nm/sightbusy-lx@LOCALHOST");
     UserGroupInformation.setConfiguration(mrCluster.getConfig());
 

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/java/org/apache/hadoop/mapred/ShuffleHandler.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/java/org/apache/hadoop/mapred/ShuffleHandler.java?rev=1166955&r1=1166954&r2=1166955&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/java/org/apache/hadoop/mapred/ShuffleHandler.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/java/org/apache/hadoop/mapred/ShuffleHandler.java Fri Sep  9 01:44:58 2011
@@ -67,7 +67,7 @@ import org.apache.hadoop.metrics2.lib.Mu
 import org.apache.hadoop.metrics2.lib.MutableGaugeInt;
 import org.apache.hadoop.security.token.Token;
 import org.apache.hadoop.yarn.api.records.ApplicationId;
-import org.apache.hadoop.yarn.server.nodemanager.NMConfig;
+import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.apache.hadoop.yarn.server.nodemanager.containermanager.AuxServices;
 import org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ContainerLocalizer;
 import org.apache.hadoop.yarn.service.AbstractService;
@@ -291,7 +291,7 @@ public class ShuffleHandler extends Abst
     private final Configuration conf;
     private final IndexCache indexCache;
     private final LocalDirAllocator lDirAlloc =
-      new LocalDirAllocator(NMConfig.NM_LOCAL_DIR);
+      new LocalDirAllocator(YarnConfiguration.NM_LOCAL_DIRS);
     private final int port;
 
     public Shuffle(Configuration conf) {

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java?rev=1166955&r1=1166954&r2=1166955&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java Fri Sep  9 01:44:58 2011
@@ -27,50 +27,331 @@ public class YarnConfiguration extends C
   private static final Splitter ADDR_SPLITTER = Splitter.on(':').trimResults();
   private static final Joiner JOINER = Joiner.on("");
 
-  public static final String RM_PREFIX = "yarn.server.resourcemanager.";
-
-  public static final String SCHEDULER_ADDRESS = RM_PREFIX
-      + "scheduler.address";    
-  
-  public static final String AM_EXPIRY_INTERVAL = RM_PREFIX
-  + "application.expiry.interval";
-  
-  public static final String DEFAULT_SCHEDULER_BIND_ADDRESS = "0.0.0.0:8030";
-
-  public static final String APPSMANAGER_ADDRESS = RM_PREFIX
-      + "appsManager.address";
-  
-  public static final String YARN_SECURITY_INFO = 
-      "yarn.security.info.class.name";
-
-  public static final String DEFAULT_APPSMANAGER_BIND_ADDRESS =
-      "0.0.0.0:8040";
-
   private static final String YARN_DEFAULT_XML_FILE = "yarn-default.xml";
   private static final String YARN_SITE_XML_FILE = "yarn-site.xml";
 
-  public static final String APPLICATION_MANAGER_PRINCIPAL =
-      "yarn.jobmanager.user-name";
-
-  public static final String RM_WEBAPP_BIND_ADDRESS = RM_PREFIX
-      + "webapp.address";
-
-  public static final String DEFAULT_RM_WEBAPP_BIND_ADDRESS = "0.0.0.0:8088";
-
   static {
     Configuration.addDefaultResource(YARN_DEFAULT_XML_FILE);
     Configuration.addDefaultResource(YARN_SITE_XML_FILE);
   }
 
-  public static final String RM_SERVER_PRINCIPAL_KEY =
-      "yarn.resourcemanager.principal";
-
+  //Configurations
+  
+  /** ACL of who can view this application.*/
   public static final String APPLICATION_ACL_VIEW_APP =
-      "application.acl-view-job";
-
+    "yarn.app.acl.view-job";
+  
+  /** ACL of who can modify this application.*/
   public static final String APPLICATION_ACL_MODIFY_APP =
-      "application.acl-modify-job";
+    "yarn.app.acl.modify-job";
+  
+  /** 
+   * Security info class This is an internal config set and
+   * read by YARN itself.
+   */
+  public static final String YARN_SECURITY_INFO = 
+    "yarn.security.info.class";
+  
+  /** Delay before deleting resource to ease debugging of NM issues */
+  public static final String DEBUG_NM_DELETE_DELAY_SEC =
+    YarnConfiguration.NM_PREFIX + "delete.debug-delay-sec";
+  
+  ////////////////////////////////
+  // IPC Configs
+  ////////////////////////////////
+  public static final String IPC_PREFIX = "yarn.ipc.";
+
+  /** Factory to create client IPC classes.*/
+  public static final String IPC_CLIENT_FACTORY = 
+    IPC_PREFIX + "client.factory.class";
+  
+  /** Type of serialization to use.*/
+  public static final String IPC_SERIALIZER_TYPE = 
+    IPC_PREFIX + "serializer.type";
+  public static final String DEFAULT_IPC_SERIALIZER_TYPE = "protocolbuffers";
+  
+  /** Factory to create server IPC classes.*/
+  public static final String IPC_SERVER_FACTORY = 
+    IPC_PREFIX + "server.factory.class";
+  
+  /** Factory to create IPC exceptions.*/
+  public static final String IPC_EXCEPTION_FACTORY = 
+    IPC_PREFIX + "exception.factory.class";
+  
+  /** Factory to create serializeable records.*/
+  public static final String IPC_RECORD_FACTORY = 
+    IPC_PREFIX + "record.factory.class";
+  
+  /** RPC class implementation*/
+  public static final String IPC_RPC_IMPL =
+    IPC_PREFIX + "rpc.class";
+  public static final String DEFAULT_IPC_RPC_IMPL = 
+    "org.apache.hadoop.yarn.ipc.HadoopYarnProtoRPC";
+  
+  ////////////////////////////////
+  // Resource Manager Configs
+  ////////////////////////////////
+  public static final String RM_PREFIX = "yarn.resourcemanager.";
+  
+  /** The address of the applications manager interface in the RM.*/
+  public static final String RM_ADDRESS = 
+    RM_PREFIX + "address";
+  public static final String DEFAULT_RM_ADDRESS =
+    "0.0.0.0:8040";
+  
+  /** The number of threads used to handle applications manager requests.*/
+  public static final String RM_CLIENT_THREAD_COUNT =
+    RM_PREFIX + "client.thread-count";
+  public static final int DEFAULT_RM_CLIENT_THREAD_COUNT = 10;
+  
+  /** The expiry interval for application master reporting.*/
+  public static final String RM_AM_EXPIRY_INTERVAL_MS = 
+    RM_PREFIX  + "am.liveness-monitor.expiry-interval-ms";
+  public static final int DEFAULT_RM_AM_EXPIRY_INTERVAL_MS = 600000;
+  
+  /** The Kerberos principal for the resource manager.*/
+  public static final String RM_PRINCIPAL =
+    RM_PREFIX + "principal";
+  
+  /** The address of the scheduler interface.*/
+  public static final String RM_SCHEDULER_ADDRESS = 
+    RM_PREFIX + "scheduler.address";
+  public static final String DEFAULT_RM_SCHEDULER_ADDRESS = "0.0.0.0:8030";
+  
+  /** Number of threads to handle scheduler interface.*/
+  public static final String RM_SCHEDULER_CLIENT_THREAD_COUNT =
+    RM_PREFIX + "scheduler.client.thread-count";
+  public static final int DEFAULT_RM_SCHEDULER_CLIENT_THREAD_COUNT = 10;
+  
+  /** The address of the RM web application.*/
+  public static final String RM_WEBAPP_ADDRESS = 
+    RM_PREFIX + "webapp.address";
+  public static final String DEFAULT_RM_WEBAPP_ADDRESS = "0.0.0.0:8088";
+  
+  public static final String RM_RESOURCE_TRACKER_ADDRESS =
+    RM_PREFIX + "resource-tracker.address";
+  public static final String DEFAULT_RM_RESOURCE_TRACKER_ADDRESS =
+    "0.0.0.0:8025";
+  
+  /** Are RM acls enabled.*/
+  public static final String RM_ACL_ENABLE = 
+    RM_PREFIX + "acl.enable";
+  public static final boolean DEFAULT_RM_ACL_ENABLE = false;
+  
+  /** ACL of who can be admin of RM.*/
+  public static final String RM_ADMIN_ACL = 
+    RM_PREFIX + "admin.acl";
+  public static final String DEFAULT_RM_ADMIN_ACL = "*";
+  
+  /** The address of the RM admin interface.*/
+  public static final String RM_ADMIN_ADDRESS = 
+    RM_PREFIX + "admin.address";
+  public static final String DEFAULT_RM_ADMIN_ADDRESS = "0.0.0.0:8141";
+  
+  /**Number of threads used to handle RM admin interface.*/
+  public static final String RM_ADMIN_CLIENT_THREAD_COUNT =
+    RM_PREFIX + "admin.client.thread-count";
+  public static final int DEFAULT_RM_ADMIN_CLIENT_THREAD_COUNT = 1;
+  
+  /** How often should the RM check that the AM is still alive.*/
+  public static final String RM_AM_LIVENESS_MONITOR_INTERVAL_MS =
+    RM_PREFIX + "amliveliness-monitor.interval-ms";
+  public static final int DEFAULT_RM_AM_LIVENESS_MONITOR_INTERVAL_MS = 1000;
+  
+  /** The maximum number of application master retries.*/
+  public static final String RM_AM_MAX_RETRIES = 
+    RM_PREFIX + "am.max-retries";
+  public static final int DEFAULT_RM_AM_MAX_RETRIES = 1;
+  
+  /** How often to check that containers are still alive. */
+  public static final String RM_CONTAINER_LIVENESS_MONITOR_INTERVAL_MS =
+    RM_PREFIX + "container.liveness-monitor.interval-ms";
+  public static final int DEFAULT_RM_CONTAINER_LIVENESS_MONITOR_INTERVAL_MS = 
+    600000;
+  
+  /** The keytab for the resource manager.*/
+  public static final String RM_KEYTAB = 
+    RM_PREFIX + "keytab";
+  
+  /** How long to wait until a node manager is considered dead.*/
+  public static final String RM_NM_EXPIRY_INTERVAL_MS = 
+    RM_PREFIX + "nm.liveness-monitor.expiry-interval-ms";
+  public static final int DEFAULT_RM_NM_EXPIRY_INTERVAL_MS = 600000;
+  
+  /** How often to check that node managers are still alive.*/
+  public static final String RM_NM_LIVENESS_MONITOR_INTERVAL_MS =
+    RM_PREFIX + "nm.liveness-monitor.interval-ms";
+  public static final int DEFAULT_RM_NM_LIVENESS_MONITOR_INTERVAL_MS = 1000;
+  
+  /** Path to file with nodes to include.*/
+  public static final String RM_NODES_INCLUDE_FILE_PATH = 
+    RM_PREFIX + "nodes.include-path";
+  public static final String DEFAULT_RM_NODES_INCLUDE_FILE_PATH = "";
+  
+  /** Path to file with nodes to exclude.*/
+  public static final String RM_NODES_EXCLUDE_FILE_PATH = 
+    RM_PREFIX + "nodes.exclude-path";
+  public static final String DEFAULT_RM_NODES_EXCLUDE_FILE_PATH = "";
+  
+  /** Number of threads to handle resource tracker calls.*/
+  public static final String RM_RESOURCE_TRACKER_CLIENT_THREAD_COUNT =
+    RM_PREFIX + "resource-tracker.client.thread-count";
+  public static final int DEFAULT_RM_RESOURCE_TRACKER_CLIENT_THREAD_COUNT = 10;
+  
+  /** The class to use as the resource scheduler.*/
+  public static final String RM_SCHEDULER = 
+    RM_PREFIX + "scheduler.class";
+  
+  /** The class to use as the persistent store.*/
+  public static final String RM_STORE = RM_PREFIX + "store.class";
+  
+  /** The address of the zookeeper instance to use with ZK store.*/
+  public static final String RM_ZK_STORE_ADDRESS = 
+    RM_PREFIX + "zookeeper-store.address";
+  
+  /** The zookeeper session timeout for the zookeeper store.*/
+  public static final String RM_ZK_STORE_TIMEOUT_MS = 
+    RM_PREFIX + "zookeeper-store.session.timeout-ms";
+  public static final int DEFAULT_RM_ZK_STORE_TIMEOUT_MS = 60000;
+  
+  /** The maximum number of completed applications RM keeps. */ 
+  public static final String RM_MAX_COMPLETED_APPLICATIONS =
+    RM_PREFIX + "max-completed-applications";
+  public static final int DEFAULT_RM_MAX_COMPLETED_APPLICATIONS = 10000;
+  
+  ////////////////////////////////
+  // Node Manager Configs
+  ////////////////////////////////
+  
+  /** Prefix for all node manager configs.*/
+  public static final String NM_PREFIX = "yarn.nodemanager.";
+  
+  /** address of node manager IPC.*/
+  public static final String NM_ADDRESS = NM_PREFIX + "address";
+  public static final String DEFAULT_NM_ADDRESS = "0.0.0.0:45454";
+  
+  /** who will execute(launch) the containers.*/
+  public static final String NM_CONTAINER_EXECUTOR = 
+    NM_PREFIX + "container-executor.class";
+  
+  /** Number of threads container manager uses.*/
+  public static final String NM_CONTAINER_MGR_THREAD_COUNT =
+    NM_PREFIX + "container-manager.thread-count";
+  public static final int DEFAULT_NM_CONTAINER_MGR_THREAD_COUNT = 5;
+  
+  /** Number of threads used in cleanup.*/
+  public static final String NM_DELETE_THREAD_COUNT = 
+    NM_PREFIX +  "delete.thread-count";
+  public static final int DEFAULT_NM_DELETE_THREAD_COUNT = 4;
+  
+  // TODO: Should this instead be dictated by RM?
+  /** Heartbeat interval to RM*/
+  public static final String NM_TO_RM_HEARTBEAT_INTERVAL_MS = 
+    NM_PREFIX + "heartbeat.interval-ms";
+  public static final int DEFAULT_NM_TO_RM_HEARTBEAT_INTERVAL_MS = 1000;
+  
+  /** Keytab for NM.*/
+  public static final String NM_KEYTAB = NM_PREFIX + "keytab";
+  
+  /**List of directories to store localized files in.*/
+  public static final String NM_LOCAL_DIRS = NM_PREFIX + "local-dirs";
+  public static final String DEFAULT_NM_LOCAL_DIRS = "/tmp/nm-local-dir";
+  
+  /** Address where the localizer IPC is.*/
+  public static final String NM_LOCALIZER_ADDRESS =
+    NM_PREFIX + "localizer.address";
+  public static final String DEFAULT_NM_LOCALIZER_ADDRESS = "0.0.0.0:4344";
+  
+  /** Interval in between cache cleanups.*/
+  public static final String NM_LOCALIZER_CACHE_CLEANUP_INTERVAL_MS =
+    NM_PREFIX + "localizer.cache.cleanup.interval-ms";
+  public static final long DEFAULT_NM_LOCALIZER_CACHE_CLEANUP_INTERVAL_MS = 
+    10 * 60 * 1000;
+  
+  /** Target size of localizer cache in MB, per local directory.*/
+  public static final String NM_LOCALIZER_CACHE_TARGET_SIZE_MB =
+    NM_PREFIX + "localizer.cache.target-size-mb";
+  public static final long DEFAULT_NM_LOCALIZER_CACHE_TARGET_SIZE_MB = 10 * 1024;
+  
+  /** Number of threads to handle localization requests.*/
+  public static final String NM_LOCALIZER_CLIENT_THREAD_COUNT =
+    NM_PREFIX + "localizer.client.thread-count";
+  public static final int DEFAULT_NM_LOCALIZER_CLIENT_THREAD_COUNT = 5;
+  
+  /** Number of threads to use for localization fetching.*/
+  public static final String NM_LOCALIZER_FETCH_THREAD_COUNT = 
+    NM_PREFIX + "localizer.fetch.thread-count";
+  public static final int DEFAULT_NM_LOCALIZER_FETCH_THREAD_COUNT = 4;
+  
+  /** Where to store container logs.*/
+  public static final String NM_LOG_DIRS = NM_PREFIX + "log-dirs";
+  public static final String DEFAULT_NM_LOG_DIRS = "/tmp/logs";
+  
+  /** Where to aggregate logs to.*/
+  public static final String NM_REMOTE_APP_LOG_DIR = 
+    NM_PREFIX + "remote-app-log-dir";
+  public static final String DEFAULT_NM_REMOTE_APP_LOG_DIR = "/tmp/logs";
+  
+  /** Amount of memory in GB that can be allocated for containers.*/
+  public static final String NM_VMEM_GB = NM_PREFIX + "resource.memory-gb";
+  public static final int DEFAULT_NM_VMEM_GB = 8;
+  
+  /** NM Webapp address.**/
+  public static final String NM_WEBAPP_ADDRESS = NM_PREFIX + "webapp.address";
+  public static final String DEFAULT_NM_WEBAPP_ADDRESS = "0.0.0.0:9999";
+  
+  /** How often to monitor containers.*/
+  public final static String NM_CONTAINER_MON_INTERVAL_MS =
+    NM_PREFIX + "container-monitor.interval-ms";
+  public final static int DEFAULT_NM_CONTAINER_MON_INTERVAL_MS = 3000;
+  
+  /** Class that calculates containers current resource utilization.*/
+  public static final String NM_CONTAINER_MON_RESOURCE_CALCULATOR =
+    NM_PREFIX + "container-monitor.resource-calculator.class";
+  
+  /** Amount of physical ram to reserve for other applications, -1 disables.*/
+  public static final String NM_RESERVED_MEMORY_MB =
+    NM_PREFIX + "reserved.memory-mb";
+  
+  /** Frequency of running node health script.*/
+  public static final String NM_HEALTH_CHECK_INTERVAL_MS = 
+    NM_PREFIX + "health-checker.interval-ms";
+  public static final long DEFAULT_NM_HEALTH_CHECK_INTERVAL_MS = 10 * 60 * 1000;
+  
+  /** Script time out period.*/
+  public static final String NM_HEALTH_CHECK_SCRIPT_TIMEOUT_MS = 
+    NM_PREFIX + "health-checker.script.timeout-ms";
+  public static final long DEFAULT_NM_HEALTH_CHECK_SCRIPT_TIMEOUT_MS = 
+    2 * DEFAULT_NM_HEALTH_CHECK_INTERVAL_MS;
+  
+  /** The health check script to run.*/
+  public static final String NM_HEALTH_CHECK_SCRIPT_PATH = 
+    NM_PREFIX + "health-checker.script.path";
+  
+  /** The arguments to pass to the health check script.*/
+  public static final String NM_HEALTH_CHECK_SCRIPT_OPTS = 
+    NM_PREFIX + "health-checker.script.opts";
+  
+  /** The path to the Linux container executor.*/
+  public static final String NM_LINUX_CONTAINER_EXECUTOR_PATH =
+    NM_PREFIX + "linux-container-executor.path";
+  
+  /** T-file compression types used to compress aggregated logs.*/
+  public static final String NM_LOG_AGG_COMPRESSION_TYPE = 
+    NM_PREFIX + "log-aggregation.compression-type";
+  public static final String DEFAULT_NM_LOG_AGG_COMPRESSION_TYPE = "none";
+  
+  /** The kerberos principal for the node manager.*/
+  public static final String NM_PRINCIPAL =
+    NM_PREFIX + "principal";
+  
+  public static final String NM_AUX_SERVICES = 
+    NM_PREFIX + "aux-services";
+  
+  public static final String NM_AUX_SERVICE_FMT =
+    NM_PREFIX + "aux-services.%s.class";
 
+  
   public YarnConfiguration() {
     super();
   }
@@ -83,13 +364,13 @@ public class YarnConfiguration extends C
   }
 
   public static String getRMWebAppURL(Configuration conf) {
-    String addr = conf.get(RM_WEBAPP_BIND_ADDRESS,
-                           DEFAULT_RM_WEBAPP_BIND_ADDRESS);
+    String addr = conf.get(YarnConfiguration.RM_WEBAPP_ADDRESS,
+                           YarnConfiguration.DEFAULT_RM_WEBAPP_ADDRESS);
     Iterator<String> it = ADDR_SPLITTER.split(addr).iterator();
     it.next(); // ignore the bind host
     String port = it.next();
     // Use apps manager address to figure out the host for webapp
-    addr = conf.get(APPSMANAGER_ADDRESS, DEFAULT_APPSMANAGER_BIND_ADDRESS);
+    addr = conf.get(YarnConfiguration.RM_ADDRESS, YarnConfiguration.DEFAULT_RM_ADDRESS);
     String host = ADDR_SPLITTER.split(addr).iterator().next();
     return JOINER.join("http://", host, ":", port, "/");
   }

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RecordFactoryProvider.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RecordFactoryProvider.java?rev=1166955&r1=1166954&r2=1166955&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RecordFactoryProvider.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RecordFactoryProvider.java Fri Sep  9 01:44:58 2011
@@ -23,16 +23,11 @@ import java.lang.reflect.Method;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.yarn.YarnException;
+import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.apache.hadoop.yarn.factories.RecordFactory;
 import org.apache.hadoop.yarn.factories.impl.pb.RecordFactoryPBImpl;
 
 public class RecordFactoryProvider {
-
-  public static final String RPC_SERIALIZER_KEY = "org.apache.yarn.ipc.rpc.serializer.property";
-  public static final String RPC_SERIALIZER_DEFAULT = "protocolbuffers";
-  
-  public static final String RECORD_FACTORY_CLASS_KEY = "org.apache.yarn.ipc.record.factory.class";
-  
   private static Configuration defaultConf;
   
   static {
@@ -48,13 +43,13 @@ public class RecordFactoryProvider {
       //Users can specify a particular factory by providing a configuration.
       conf = defaultConf;
     }
-    String recordFactoryClassName = conf.get(RECORD_FACTORY_CLASS_KEY);
+    String recordFactoryClassName = conf.get(YarnConfiguration.IPC_RECORD_FACTORY);
     if (recordFactoryClassName == null) {
-      String serializer = conf.get(RPC_SERIALIZER_KEY, RPC_SERIALIZER_DEFAULT);
-      if (serializer.equals(RPC_SERIALIZER_DEFAULT)) {
+      String serializer = conf.get(YarnConfiguration.IPC_SERIALIZER_TYPE, YarnConfiguration.DEFAULT_IPC_SERIALIZER_TYPE);
+      if (serializer.equals(YarnConfiguration.DEFAULT_IPC_SERIALIZER_TYPE)) {
         return RecordFactoryPBImpl.get();
       } else {
-        throw new YarnException("Unknown serializer: [" + conf.get(RPC_SERIALIZER_KEY) + "]. Use keys: [" + RECORD_FACTORY_CLASS_KEY + "] to specify Record factory");
+        throw new YarnException("Unknown serializer: [" + conf.get(YarnConfiguration.IPC_SERIALIZER_TYPE) + "]. Use keys: [" + YarnConfiguration.IPC_RECORD_FACTORY + "] to specify Record factory");
       }
     } else {
       return (RecordFactory) getFactoryClassInstance(recordFactoryClassName);

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RpcFactoryProvider.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RpcFactoryProvider.java?rev=1166955&r1=1166954&r2=1166955&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RpcFactoryProvider.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RpcFactoryProvider.java Fri Sep  9 01:44:58 2011
@@ -25,6 +25,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.yarn.YarnException;
+import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.apache.hadoop.yarn.factories.RpcClientFactory;
 import org.apache.hadoop.yarn.factories.RpcServerFactory;
 import org.apache.hadoop.yarn.factories.impl.pb.RpcClientFactoryPBImpl;
@@ -35,13 +36,7 @@ import org.apache.hadoop.yarn.factories.
  */
 public class RpcFactoryProvider {
   private static final Log LOG = LogFactory.getLog(RpcFactoryProvider.class);
-  //TODO Move these keys to CommonConfigurationKeys
-  public static final String RPC_SERIALIZER_KEY = "org.apache.yarn.ipc.rpc.serializer.property";
-  public static final String RPC_SERIALIZER_DEFAULT = "protocolbuffers";
 
-  public static final String RPC_CLIENT_FACTORY_CLASS_KEY = "org.apache.yarn.ipc.client.factory.class";
-  public static final String RPC_SERVER_FACTORY_CLASS_KEY = "org.apache.yarn.ipc.server.factory.class";
-  
   private RpcFactoryProvider() {
     
   }
@@ -51,12 +46,12 @@ public class RpcFactoryProvider {
     if (conf == null) {
       conf = new Configuration();
     }
-    String serverFactoryClassName = conf.get(RPC_SERVER_FACTORY_CLASS_KEY);
+    String serverFactoryClassName = conf.get(YarnConfiguration.IPC_SERVER_FACTORY);
     if (serverFactoryClassName == null) {
-      if (conf.get(RPC_SERIALIZER_KEY, RPC_SERIALIZER_DEFAULT).equals(RPC_SERIALIZER_DEFAULT)) {
+      if (conf.get(YarnConfiguration.IPC_SERIALIZER_TYPE, YarnConfiguration.DEFAULT_IPC_SERIALIZER_TYPE).equals(YarnConfiguration.DEFAULT_IPC_SERIALIZER_TYPE)) {
         return RpcServerFactoryPBImpl.get();
       } else {
-        throw new YarnException("Unknown serializer: [" + conf.get(RPC_SERIALIZER_KEY) + "]. Use keys: [" + RPC_CLIENT_FACTORY_CLASS_KEY + "][" + RPC_SERVER_FACTORY_CLASS_KEY + "] to specify factories");
+        throw new YarnException("Unknown serializer: [" + conf.get(YarnConfiguration.IPC_SERIALIZER_TYPE) + "]. Use keys: [" + YarnConfiguration.IPC_CLIENT_FACTORY + "][" + YarnConfiguration.IPC_SERVER_FACTORY + "] to specify factories");
       }
     } else {
       return (RpcServerFactory) getFactoryClassInstance(serverFactoryClassName);
@@ -64,12 +59,12 @@ public class RpcFactoryProvider {
   }
   
   public static RpcClientFactory getClientFactory(Configuration conf) {
-    String clientFactoryClassName = conf.get(RPC_CLIENT_FACTORY_CLASS_KEY);
+    String clientFactoryClassName = conf.get(YarnConfiguration.IPC_CLIENT_FACTORY);
     if (clientFactoryClassName == null) {
-      if (conf.get(RPC_SERIALIZER_KEY, RPC_SERIALIZER_DEFAULT).equals(RPC_SERIALIZER_DEFAULT)) {
+      if (conf.get(YarnConfiguration.IPC_SERIALIZER_TYPE, YarnConfiguration.DEFAULT_IPC_SERIALIZER_TYPE).equals(YarnConfiguration.DEFAULT_IPC_SERIALIZER_TYPE)) {
         return RpcClientFactoryPBImpl.get();
       } else {
-        throw new YarnException("Unknown serializer: [" + conf.get(RPC_SERIALIZER_KEY) + "]. Use keys: [" + RPC_CLIENT_FACTORY_CLASS_KEY + "][" + RPC_SERVER_FACTORY_CLASS_KEY + "] to specify factories");
+        throw new YarnException("Unknown serializer: [" + conf.get(YarnConfiguration.IPC_SERIALIZER_TYPE) + "]. Use keys: [" + YarnConfiguration.IPC_CLIENT_FACTORY + "][" + YarnConfiguration.IPC_SERVER_FACTORY + "] to specify factories");
       }
     } else {
       return(RpcClientFactory) getFactoryClassInstance(clientFactoryClassName);

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/YarnRemoteExceptionFactoryProvider.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/YarnRemoteExceptionFactoryProvider.java?rev=1166955&r1=1166954&r2=1166955&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/YarnRemoteExceptionFactoryProvider.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/YarnRemoteExceptionFactoryProvider.java Fri Sep  9 01:44:58 2011
@@ -23,16 +23,12 @@ import java.lang.reflect.Method;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.yarn.YarnException;
+import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.apache.hadoop.yarn.factories.YarnRemoteExceptionFactory;
 import org.apache.hadoop.yarn.factories.impl.pb.YarnRemoteExceptionFactoryPBImpl;
 
 public class YarnRemoteExceptionFactoryProvider {
 
-  public static final String RPC_SERIALIZER_KEY = "org.apache.yarn.ipc.rpc.serializer.property";
-  public static final String RPC_SERIALIZER_DEFAULT = "protocolbuffers";
-  
-  public static final String EXCEPTION_FACTORY_CLASS_KEY = "org.apache.yarn.ipc.exception.factory.class";
-  
   private YarnRemoteExceptionFactoryProvider() {
   }
   
@@ -40,13 +36,13 @@ public class YarnRemoteExceptionFactoryP
     if (conf == null) {
       conf = new Configuration();
     }
-    String recordFactoryClassName = conf.get(EXCEPTION_FACTORY_CLASS_KEY);
+    String recordFactoryClassName = conf.get(YarnConfiguration.IPC_EXCEPTION_FACTORY);
     if (recordFactoryClassName == null) {
-      String serializer = conf.get(RPC_SERIALIZER_KEY, RPC_SERIALIZER_DEFAULT);
-      if (serializer.equals(RPC_SERIALIZER_DEFAULT)) {
+      String serializer = conf.get(YarnConfiguration.IPC_SERIALIZER_TYPE, YarnConfiguration.DEFAULT_IPC_SERIALIZER_TYPE);
+      if (serializer.equals(YarnConfiguration.DEFAULT_IPC_SERIALIZER_TYPE)) {
         return YarnRemoteExceptionFactoryPBImpl.get();
       } else {
-        throw new YarnException("Unknown serializer: [" + conf.get(RPC_SERIALIZER_KEY) + "]. Use keys: [" + EXCEPTION_FACTORY_CLASS_KEY + "] to specify Exception factory");
+        throw new YarnException("Unknown serializer: [" + conf.get(YarnConfiguration.IPC_SERIALIZER_TYPE) + "]. Use keys: [" + YarnConfiguration.IPC_EXCEPTION_FACTORY + "] to specify Exception factory");
       }
     } else {
       return (YarnRemoteExceptionFactory) getFactoryClassInstance(recordFactoryClassName);

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/ipc/YarnRPC.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/ipc/YarnRPC.java?rev=1166955&r1=1166954&r2=1166955&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/ipc/YarnRPC.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/ipc/YarnRPC.java Fri Sep  9 01:44:58 2011
@@ -27,6 +27,7 @@ import org.apache.hadoop.conf.Configurat
 import org.apache.hadoop.security.token.SecretManager;
 import org.apache.hadoop.security.token.TokenIdentifier;
 import org.apache.hadoop.yarn.YarnException;
+import org.apache.hadoop.yarn.conf.YarnConfiguration;
 
 /**
  * Abstraction to get the RPC implementation for Yarn.
@@ -34,13 +35,6 @@ import org.apache.hadoop.yarn.YarnExcept
 public abstract class YarnRPC {
   private static final Log LOG = LogFactory.getLog(YarnRPC.class);
   
-  public static final String RPC_CLASSNAME 
-      = "org.apache.hadoop.yarn.ipc.YarnRPC.classname";
-
-  //use the default as Hadoop RPC
-  public static final String DEFAULT_RPC 
-      = "org.apache.hadoop.yarn.ipc.HadoopYarnProtoRPC";
-
   public abstract Object getProxy(Class protocol, InetSocketAddress addr,
       Configuration conf);
 
@@ -50,10 +44,10 @@ public abstract class YarnRPC {
       int numHandlers);
 
   public static YarnRPC create(Configuration conf) {
-    LOG.info("Creating YarnRPC for " + conf.get(RPC_CLASSNAME));
-    String clazzName = conf.get(RPC_CLASSNAME);
+    LOG.info("Creating YarnRPC for " + conf.get(YarnConfiguration.IPC_RPC_IMPL));
+    String clazzName = conf.get(YarnConfiguration.IPC_RPC_IMPL);
     if (clazzName == null) {
-      clazzName = DEFAULT_RPC;
+      clazzName = YarnConfiguration.DEFAULT_IPC_RPC_IMPL;
     }
     try {
       return (YarnRPC) Class.forName(clazzName).newInstance();

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/security/client/ClientRMSecurityInfo.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/security/client/ClientRMSecurityInfo.java?rev=1166955&r1=1166954&r2=1166955&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/security/client/ClientRMSecurityInfo.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/security/client/ClientRMSecurityInfo.java Fri Sep  9 01:44:58 2011
@@ -44,7 +44,7 @@ public class ClientRMSecurityInfo extend
 
       @Override
       public String serverPrincipal() {
-        return YarnConfiguration.RM_SERVER_PRINCIPAL_KEY;
+        return YarnConfiguration.RM_PRINCIPAL;
       }
 
       @Override

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/TestRPC.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/TestRPC.java?rev=1166955&r1=1166954&r2=1166955&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/TestRPC.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/TestRPC.java Fri Sep  9 01:44:58 2011
@@ -38,6 +38,7 @@ import org.apache.hadoop.yarn.api.record
 import org.apache.hadoop.yarn.api.records.ContainerState;
 import org.apache.hadoop.yarn.api.records.ContainerStatus;
 import org.apache.hadoop.yarn.api.records.Resource;
+import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.apache.hadoop.yarn.exceptions.YarnRemoteException;
 import org.apache.hadoop.yarn.factories.RecordFactory;
 import org.apache.hadoop.yarn.factory.providers.RecordFactoryProvider;
@@ -70,7 +71,7 @@ public class TestRPC {
   
   private void test(String rpcClass) throws Exception {
     Configuration conf = new Configuration();
-    conf.set(YarnRPC.RPC_CLASSNAME, rpcClass);
+    conf.set(YarnConfiguration.IPC_RPC_IMPL, rpcClass);
     YarnRPC rpc = YarnRPC.create(conf);
     String bindAddr = "localhost:0";
     InetSocketAddress addr = NetUtils.createSocketAddr(bindAddr);

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/TestRpcFactoryProvider.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/TestRpcFactoryProvider.java?rev=1166955&r1=1166954&r2=1166955&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/TestRpcFactoryProvider.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/TestRpcFactoryProvider.java Fri Sep  9 01:44:58 2011
@@ -21,6 +21,7 @@ package org.apache.hadoop.yarn;
 import junit.framework.Assert;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.apache.hadoop.yarn.factories.RpcClientFactory;
 import org.apache.hadoop.yarn.factories.RpcServerFactory;
 import org.apache.hadoop.yarn.factories.impl.pb.RpcClientFactoryPBImpl;
@@ -42,7 +43,7 @@ public class TestRpcFactoryProvider {
     Assert.assertEquals(RpcClientFactoryPBImpl.class, clientFactory.getClass());
     Assert.assertEquals(RpcServerFactoryPBImpl.class, serverFactory.getClass());
     
-    conf.set(RpcFactoryProvider.RPC_SERIALIZER_KEY, "writable");
+    conf.set(YarnConfiguration.IPC_SERIALIZER_TYPE, "writable");
     try {
       clientFactory = RpcFactoryProvider.getClientFactory(conf);
       Assert.fail("Expected an exception - unknown serializer");
@@ -55,8 +56,8 @@ public class TestRpcFactoryProvider {
     }
     
     conf = new Configuration();
-    conf.set(RpcFactoryProvider.RPC_CLIENT_FACTORY_CLASS_KEY, "NonExistantClass");
-    conf.set(RpcFactoryProvider.RPC_SERVER_FACTORY_CLASS_KEY, RpcServerFactoryPBImpl.class.getName());
+    conf.set(YarnConfiguration.IPC_CLIENT_FACTORY, "NonExistantClass");
+    conf.set(YarnConfiguration.IPC_SERVER_FACTORY, RpcServerFactoryPBImpl.class.getName());
     
     try {
       clientFactory = RpcFactoryProvider.getClientFactory(conf);

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/NodeHealthCheckerService.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/NodeHealthCheckerService.java?rev=1166955&r1=1166954&r2=1166955&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/NodeHealthCheckerService.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/NodeHealthCheckerService.java Fri Sep  9 01:44:58 2011
@@ -32,6 +32,7 @@ import org.apache.hadoop.util.Shell.Exit
 import org.apache.hadoop.util.Shell.ShellCommandExecutor;
 import org.apache.hadoop.util.StringUtils;
 import org.apache.hadoop.yarn.api.records.NodeHealthStatus;
+import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.apache.hadoop.yarn.service.AbstractService;
 
 /**
@@ -62,28 +63,9 @@ public class NodeHealthCheckerService ex
   /** Pattern used for searching in the output of the node health script */
   static private final String ERROR_PATTERN = "ERROR";
 
-  /* Configuration keys */
-  public static final String HEALTH_CHECK_SCRIPT_PROPERTY = 
-    "yarn.server.nodemanager.healthchecker.script.path";
-
-  public static final String HEALTH_CHECK_INTERVAL_PROPERTY = 
-    "yarn.server.nodemanager.healthchecker.interval";
-
-  public static final String HEALTH_CHECK_FAILURE_INTERVAL_PROPERTY = 
-    "yarn.server.nodemanager.healthchecker.script.timeout";
-
-  public static final String HEALTH_CHECK_SCRIPT_ARGUMENTS_PROPERTY = 
-    "yarn.server.nodemanager.healthchecker.script.args";
-  
-  /* end of configuration keys */
   /** Time out error message */
   static final String NODE_HEALTH_SCRIPT_TIMED_OUT_MSG = "Node health script timed out";
 
-  /** Default frequency of running node health script */
-  private static final long DEFAULT_HEALTH_CHECK_INTERVAL = 10 * 60 * 1000;
-  /** Default script time out period */
-  private static final long DEFAULT_HEALTH_SCRIPT_FAILURE_INTERVAL = 2 * DEFAULT_HEALTH_CHECK_INTERVAL;
-
   private boolean isHealthy;
 
   private String healthReport;
@@ -224,13 +206,13 @@ public class NodeHealthCheckerService ex
   public void init(Configuration conf) {
     this.conf = conf;
     this.nodeHealthScript = 
-        conf.get(HEALTH_CHECK_SCRIPT_PROPERTY);
-    this.intervalTime = conf.getLong(HEALTH_CHECK_INTERVAL_PROPERTY,
-        DEFAULT_HEALTH_CHECK_INTERVAL);
+        conf.get(YarnConfiguration.NM_HEALTH_CHECK_SCRIPT_PATH);
+    this.intervalTime = conf.getLong(YarnConfiguration.NM_HEALTH_CHECK_INTERVAL_MS,
+        YarnConfiguration.DEFAULT_NM_HEALTH_CHECK_INTERVAL_MS);
     this.scriptTimeout = conf.getLong(
-        HEALTH_CHECK_FAILURE_INTERVAL_PROPERTY,
-        DEFAULT_HEALTH_SCRIPT_FAILURE_INTERVAL);
-    String[] args = conf.getStrings(HEALTH_CHECK_SCRIPT_ARGUMENTS_PROPERTY,
+        YarnConfiguration.NM_HEALTH_CHECK_SCRIPT_TIMEOUT_MS,
+        YarnConfiguration.DEFAULT_NM_HEALTH_CHECK_SCRIPT_TIMEOUT_MS);
+    String[] args = conf.getStrings(YarnConfiguration.NM_HEALTH_CHECK_SCRIPT_OPTS,
         new String[] {});
     timer = new NodeHealthMonitorExecutor(args);
   }
@@ -340,7 +322,7 @@ public class NodeHealthCheckerService ex
    */
   public static boolean shouldRun(Configuration conf) {
     String nodeHealthScript = 
-      conf.get(HEALTH_CHECK_SCRIPT_PROPERTY);
+      conf.get(YarnConfiguration.NM_HEALTH_CHECK_SCRIPT_PATH);
     if (nodeHealthScript == null || nodeHealthScript.trim().isEmpty()) {
       return false;
     }

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/RMNMSecurityInfoClass.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/RMNMSecurityInfoClass.java?rev=1166955&r1=1166954&r2=1166955&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/RMNMSecurityInfoClass.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/RMNMSecurityInfoClass.java Fri Sep  9 01:44:58 2011
@@ -43,12 +43,12 @@ public class RMNMSecurityInfoClass exten
 
       @Override
       public String serverPrincipal() {
-        return YarnConfiguration.RM_SERVER_PRINCIPAL_KEY;
+        return YarnConfiguration.RM_PRINCIPAL;
       }
 
       @Override
       public String clientPrincipal() {
-        return YarnServerConfig.NM_SERVER_PRINCIPAL_KEY;
+        return YarnConfiguration.NM_PRINCIPAL;
       }
     };
   }

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/resources/yarn-default.xml
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/resources/yarn-default.xml?rev=1166955&r1=1166954&r2=1166955&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/resources/yarn-default.xml (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/resources/yarn-default.xml Fri Sep  9 01:44:58 2011
@@ -1,212 +1,367 @@
 <?xml version="1.0"?>
 <configuration>
+  
+  <!-- IPC Configs -->
+  <property>
+    <description>Factory to create client IPC classes.</description>
+    <name>yarn.ipc.client.factory.class</name>
+  </property>
+
+  <property>
+    <description>Type of serialization to use.</description>
+    <name>yarn.ipc.serializer.type</name>
+    <value>protocolbuffers</value>
+  </property>
+
+  <property>
+    <description>Factory to create server IPC classes.</description>
+    <name>yarn.ipc.server.factory.class</name>
+  </property>
+
+  <property>
+    <description>Factory to create IPC exceptions.</description>
+    <name>yarn.ipc.exception.factory.class</name>
+  </property>
+
+  <property>
+    <description>Factory to create serializeable records.</description>
+    <name>yarn.ipc.record.factory.class</name>
+  </property>
+
+  <property>
+    <description>RPC class implementation</description>
+    <name>yarn.ipc.rpc.class</name>
+    <value>org.apache.hadoop.yarn.ipc.HadoopYarnProtoRPC</value>
+  </property>
+  
+  <!-- Resource Manager Configs -->
+  <property>
+    <description>The address of the applications manager interface in the RM.</description>
+    <name>yarn.resourcemanager.address</name>
+    <value>0.0.0.0:8040</value>
+  </property>
+
+  <property>
+    <description>The number of threads used to handle applications manager requests.</description>
+    <name>yarn.resourcemanager.client.thread-count</name>
+    <value>10</value>
+  </property>
+
+  <property>
+    <description>The expiry interval for application master reporting.</description>
+    <name>yarn.resourcemanager.am.liveness-monitor.expiry-interval-ms</name>
+    <value>600000</value>
+  </property>
 
- <property>
+  <property>
+    <description>The Kerberos principal for the resource manager.</description>
     <name>yarn.resourcemanager.principal</name>
     <value>rm/sightbusy-lx@LOCALHOST</value>
   </property>
 
- <property>
-    <name>yarn.nodemanager.principal</name>
-    <value>nm/sightbusy-lx@LOCALHOST</value>
+  <property>
+    <description>The address of the scheduler interface.</description>
+    <name>yarn.resourcemanager.scheduler.address</name>
+    <value>0.0.0.0:8030</value>
   </property>
 
-
-<!-- All resourcemanager related configuration properties -->
+  <property>
+    <description>Number of threads to handle scheduler interface.</description>
+    <name>yarn.resourcemanager.scheduler.client.thread-count</name>
+    <value>10</value>
+  </property>
 
   <property>
-    <name>yarn.server.resourcemanager.address</name>
-    <value>0.0.0.0:8020</value>
+    <description>The address of the RM web application.</description>
+    <name>yarn.resourcemanager.webapp.address</name>
+    <value>0.0.0.0:8088</value>
   </property>
 
- <property>
-    <name>yarn.server.resourcemanager.resourcetracker.address</name>
+  <property>
+    <name>yarn.resourcemanager.resource-tracker.address</name>
     <value>0.0.0.0:8025</value>
   </property>
 
- <property>
-    <name>yarn.server.resourcemanager.scheduler.address</name>
-    <value>0.0.0.0:8030</value>
+  <property>
+    <description>Are RM acls enabled.</description>
+    <name>yarn.resourcemanager.acl.enable</name>
+    <value>false</value>
+  </property>
+
+  <property>
+    <description>ACL of who can be admin of RM.</description>
+    <name>yarn.resourcemanager.admin.acl</name>
+    <value>*</value>
   </property>
 
- <property>
-    <name>yarn.server.resourcemanager.admin.address</name>
+  <property>
+    <description>The address of the RM admin interface.</description>
+    <name>yarn.resourcemanager.admin.address</name>
     <value>0.0.0.0:8141</value>
   </property>
 
   <property>
-    <name>yarn.server.resourcemanager.application.max.retries</name>
+    <description>Number of threads used to handle RM admin interface.</description>
+    <name>yarn.resourcemanager.admin.client.thread-count</name>
+    <value>1</value>
+  </property>
+
+  <property>
+    <description>How often should the RM check that the AM is still alive.</description>
+    <name>yarn.resourcemanager.amliveliness-monitor.interval-ms</name>
+    <value>1000</value>
+  </property>
+
+  <property>
+    <description>The maximum number of application master retries.</description>
+    <name>yarn.resourcemanager.am.max-retries</name>
     <value>1</value>
-    <description>The number of times an application will be retried in case
-    of AM failure.</description>
   </property>
+
+  <property>
+    <description>How often to check that containers are still alive. </description>
+    <name>yarn.resourcemanager.container.liveness-monitor.interval-ms</name>
+    <value>600000</value>
+  </property>
+
   <property>
-    <name>yarn.server.resourcemanager.keytab</name>
+    <description>The keytab for the resource manager.</description>
+    <name>yarn.resourcemanager.keytab</name>
     <value>/etc/krb5.keytab</value>
   </property>
 
   <property>
-    <name>yarn.server.resourcemanager.expire.applications.completed.max</name>
-    <value>10000</value>
-    <description>the maximum number of completed applications the RM 
-      keeps in memory
-    </description>
+    <description>How long to wait until a node manager is considered dead.</description>
+    <name>yarn.resourcemanager.nm.liveness-monitor.expiry-interval-ms</name>
+    <value>600000</value>
   </property>
 
-<!-- All nodemanager related configuration properties -->
+  <property>
+    <description>How often to check that node managers are still alive.</description>
+    <name>yarn.resourcemanager.nm.liveness-monitor.interval-ms</name>
+    <value>1000</value>
+  </property>
 
   <property>
-    <name>yarn.server.nodemanager.local-dir</name>
-    <value>/tmp/nm-local-dir</value>
+    <description>Path to file with nodes to include.</description>
+    <name>yarn.resourcemanager.nodes.include-path</name>
+    <value></value>
   </property>
 
   <property>
-    <name>yarn.server.nodemanager.log.dir</name>
-    <value>/tmp/logs</value>
+    <description>Path to file with nodes to exclude.</description>
+    <name>yarn.resourcemanager.nodes.exclude-path</name>
+    <value></value>
   </property>
 
   <property>
-    <name>yarn.apps.stagingDir</name>
-    <value>/tmp/hadoop-yarn/${user.name}/staging</value>
-   </property>
+    <description>Number of threads to handle resource tracker calls.</description>
+    <name>yarn.resourcemanager.resource-tracker.client.thread-count</name>
+    <value>10</value>
+  </property>
 
   <property>
-    <name>yarn.apps.history.stagingDir</name>
-    <value>/tmp/hadoop-yarn/${user.name}/staging</value>
-   </property>
+    <description>The class to use as the resource scheduler.</description>
+    <name>yarn.resourcemanager.scheduler.class</name>
+  </property>
 
   <property>
-    <name>yarn.server.nodemanager.keytab</name>
-    <value>/etc/krb5.keytab</value>
+    <description>The class to use as the persistent store.</description>
+    <name>yarn.resourcemanager.store.class</name>
   </property>
 
   <property>
-    <name>yarn.server.nodemanager.container-executor.class</name>
-    <value>org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor</value>
-    <!--<value>org.apache.hadoop.yarn.server.nodemanager.LinuxContainerExecutor</value>-->
+    <description>The address of the zookeeper instance to use with ZK store.</description>
+    <name>yarn.resourcemanager.zookeeper-store.address</name>
+  </property>
+
+  <property>
+    <description>The zookeeper session timeout for the zookeeper store.</description>
+    <name>yarn.resourcemanager.zookeeper-store.session.timeout-ms</name>
+    <value>60000</value>
   </property>
 
-  <property><name>NM_HOSTS</name><value>0.0.0.0:45454</value></property> 
+  <property>
+    <description>The maximum number of completed applications RM keeps. </description>
+    <name>yarn.resourcemanager.max-completed-applications</name>
+    <value>10000</value>
+  </property>
 
+  <!-- Node Manager Configs -->
   <property>
-    <name>yarn.server.nodemanager.address</name>
+    <description>address of node manager IPC.</description>
+    <name>yarn.nodemanager.address</name>
     <value>0.0.0.0:45454</value>
   </property>
 
-  <!--  HealthChecker's properties -->
   <property>
-    <name>yarn.server.nodemanager.healthchecker.script.path</name>
-    <value></value>
-    <description>Location of the node's health-check script on the local
-    file-system.
-    </description>
+    <description>who will execute(launch) the containers.</description>
+    <name>yarn.nodemanager.container-executor.class</name>
+    <value>org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor</value>
+<!--<value>org.apache.hadoop.yarn.server.nodemanager.LinuxContainerExecutor</value>-->
   </property>
 
   <property>
-    <name>yarn.server.nodemanager.healthchecker.interval</name>
-    <value>600000</value>
-    <description>Frequency of the health-check run by the NodeManager
-    </description>
+    <description>Number of threads container manager uses.</description>
+    <name>yarn.nodemanager.container-manager.thread-count</name>
+    <value>5</value>
   </property>
 
   <property>
-    <name>yarn.server.nodemanager.healthchecker.script.timeout</name>
-    <value>1200000</value>
-    <description>Timeout for the health-check run by the NodeManager
-    </description>
+    <description>Number of threads used in cleanup.</description>
+    <name>yarn.nodemanager.delete.thread-count</name>
+    <value>4</value>
   </property>
 
   <property>
-    <name>yarn.server.nodemanager.healthchecker.script.args</name>
-    <value></value>
-    <description>Arguments to be passed to the health-check script run
-    by the NodeManager</description>
+    <description>Heartbeat interval to RM</description>
+    <name>yarn.nodemanager.heartbeat.interval-ms</name>
+    <value>1000</value>
   </property>
 
   <property>
-    <name>yarn.server.nodemanager.healthchecker.script.path</name>
-    <value></value>
-    <description>Location of the node's health-check script on the local
-    file-system.
-    </description>
+    <description>Keytab for NM.</description>
+    <name>yarn.nodemanager.keytab</name>
+    <value>/etc/krb5.keytab</value>
+  </property>
+
+  <property>
+    <description>List of directories to store localized files in.</description>
+    <name>yarn.nodemanager.local-dirs</name>
+    <value>/tmp/nm-local-dir</value>
+  </property>
+
+  <property>
+    <description>Address where the localizer IPC is.</description>
+    <name>yarn.nodemanager.localizer.address</name>
+    <value>0.0.0.0:4344</value>
   </property>
 
   <property>
-    <name>yarn.server.nodemanager.healthchecker.interval</name>
+    <description>Interval in between cache cleanups.</description>
+    <name>yarn.nodemanager.localizer.cache.cleanup.interval-ms</name>
     <value>600000</value>
-    <description>Frequency of the health-check run by the NodeManager
-    </description>
   </property>
 
   <property>
-    <name>yarn.server.nodemanager.healthchecker.script.timeout</name>
-    <value>1200000</value>
-    <description>Timeout for the health-check run by the NodeManager
-    </description>
+    <description>Target size of localizer cache in MB, per local directory.</description>
+    <name>yarn.nodemanager.localizer.cache.target-size-mb</name>
+    <value>10240</value>
   </property>
 
   <property>
-    <name>yarn.server.nodemanager.healthchecker.script.args</name>
-    <value></value>
-    <description>Arguments to be passed to the health-check script run
-    by the NodeManager</description>
+    <description>Number of threads to handle localization requests.</description>
+    <name>yarn.nodemanager.localizer.client.thread-count</name>
+    <value>5</value>
+  </property>
+
+  <property>
+    <description>Number of threads to use for localization fetching.</description>
+    <name>yarn.nodemanager.localizer.fetch.thread-count</name>
+    <value>4</value>
   </property>
-  <!-- End of HealthChecker's properties -->
 
-  <!-- ContainerMonitor related properties -->
+  <property>
+    <description>Where to store container logs.</description>
+    <name>yarn.nodemanager.log-dirs</name>
+    <value>/tmp/logs</value>
+  </property>
 
   <property>
-    <name>yarn.server.nodemanager.containers-monitor.monitoring-interval</name>
-    <value>3000</value>
+    <description>Where to aggregate logs to.</description>
+    <name>yarn.nodemanager.remote-app-log-dir</name>
+    <value>/tmp/logs</value>
   </property>
 
   <property>
-    <name>yarn.server.nodemanager.containers-monitor.resourcecalculatorplugin</name>
-    <value></value>
+    <description>Amount of memory in GB that can be allocated for containers.</description>
+    <name>yarn.nodemanager.resource.memory-gb</name>
+    <value>8</value>
   </property>
 
-   <property>
-     <name>yarn.server.nodemanager.reserved-physical-memory.mb</name>
-     <value>-1</value>
-   </property>
+  <property>
+    <description>NM Webapp address.</description>
+    <name>yarn.nodemanager.webapp.address</name>
+    <value>0.0.0.0:9999</value>
+  </property>
+
+  <property>
+    <description>How often to monitor containers.</description>
+    <name>yarn.nodemanager.container-monitor.interval-ms</name>
+    <value>3000</value>
+  </property>
 
-  <!-- End of ContainerMonitor related properties -->
+  <property>
+    <description>Class that calculates containers current resource utilization.</description>
+    <name>yarn.nodemanager.container-monitor.resource-calculator.class</name>
+  </property>
 
-<!-- All MRAppMaster related configuration properties -->
+  <property>
+    <description>Amount of physical ram to reserve for other applications, -1 disables.</description>
+    <name>yarn.nodemanager.reserved.memory-mb</name>
+    <value>-1</value>
+  </property>
 
   <property>
-    <name>yarn.server.mapreduce-appmanager.attempt-listener.bindAddress</name>
-    <value>0.0.0.0</value>
+    <description>Frequency of running node health script.</description>
+    <name>yarn.nodemanager.health-checker.interval-ms</name>
+    <value>600000</value>
   </property>
 
   <property>
-    <name>yarn.server.mapreduce-appmanager.client-service.bindAddress</name>
-    <value>0.0.0.0</value>
+    <description>Script time out period.</description>
+    <name>yarn.nodemanager.health-checker.script.timeout-ms</name>
+    <value>1200000</value>
   </property>
 
+  <property>
+    <description>The health check script to run.</description>
+    <name>yarn.nodemanager.health-checker.script.path</name>
+    <value></value>
+  </property>
 
   <property>
-    <name>mapreduce.job.jar</name>
+    <description>The arguments to pass to the health check script.</description>
+    <name>yarn.nodemanager.health-checker.script.opts</name>
     <value></value>
-    <!--<value>~/Workspace/eclipse-workspace/yarn/yarn-mapreduce/yarn-mapreduce-app/target/yarn-mapreduce-app-0.24.0-SNAPSHOT.jar</value>-->
   </property>
 
   <property>
-   <name>mapreduce.job.hdfs-servers</name>
-   <value>${fs.default.name}</value>
- </property>
+    <description>The path to the Linux container executor.</description>
+    <name>yarn.nodemanager.linux-container-executor.path</name>
+  </property>
+
+  <property>
+    <description>T-file compression types used to compress aggregated logs.</description>
+    <name>yarn.nodemanager.log-aggregation.compression-type</name>
+    <value>none</value>
+  </property>
+
+  <property>
+    <description>The kerberos principal for the node manager.</description>
+    <name>yarn.nodemanager.principal</name>
+    <value>nm/sightbusy-lx@LOCALHOST</value>
+  </property>
+
+  <property>
+    <name>yarn.nodemanager.aux-services</name>
+    <value></value>
+    <!-- <value>mapreduce.shuffle</value> -->
+  </property>
 
+  <!--Map Reduce configuration-->
   <property>
-  <name>nodemanager.auxiluary.services</name>
-  <value></value>
-  <!-- <value>mapreduce.shuffle</value> -->
+    <name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
+    <value>org.apache.hadoop.mapred.ShuffleHandler</value>
   </property>
 
-<!--
   <property>
-  <name>nodemanager.aux.service.mapreduce.shuffle.class</name>
-  <value>org.apache.hadoop.mapred.ShuffleHandler</value>
+    <name>mapreduce.job.jar</name>
+    <value/>
   </property>
--->
 
+  <property>
+    <name>mapreduce.job.hdfs-servers</name>
+    <value>${fs.default.name}</value>
+  </property>
 </configuration>

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/TestNodeHealthService.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/TestNodeHealthService.java?rev=1166955&r1=1166954&r2=1166955&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/TestNodeHealthService.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/TestNodeHealthService.java Fri Sep  9 01:44:58 2011
@@ -30,6 +30,7 @@ import org.apache.hadoop.conf.Configurat
 import org.apache.hadoop.fs.FileContext;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.yarn.api.records.NodeHealthStatus;
+import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.apache.hadoop.yarn.factories.RecordFactory;
 import org.apache.hadoop.yarn.factory.providers.RecordFactoryProvider;
 import org.junit.After;
@@ -66,11 +67,11 @@ public class TestNodeHealthService {
 
   private Configuration getConfForNodeHealthScript() {
     Configuration conf = new Configuration();
-    conf.set(NodeHealthCheckerService.HEALTH_CHECK_SCRIPT_PROPERTY,
+    conf.set(YarnConfiguration.NM_HEALTH_CHECK_SCRIPT_PATH,
         nodeHealthscriptFile.getAbsolutePath());
-    conf.setLong(NodeHealthCheckerService.HEALTH_CHECK_INTERVAL_PROPERTY, 500);
+    conf.setLong(YarnConfiguration.NM_HEALTH_CHECK_INTERVAL_MS, 500);
     conf.setLong(
-        NodeHealthCheckerService.HEALTH_CHECK_FAILURE_INTERVAL_PROPERTY, 1000);
+        YarnConfiguration.NM_HEALTH_CHECK_SCRIPT_TIMEOUT_MS, 1000);
     return conf;
   }
 

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java?rev=1166955&r1=1166954&r2=1166955&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java Fri Sep  9 01:44:58 2011
@@ -33,6 +33,7 @@ import org.apache.hadoop.fs.permission.F
 import org.apache.hadoop.util.Shell.ExitCodeException;
 import org.apache.hadoop.util.Shell.ShellCommandExecutor;
 import org.apache.hadoop.yarn.api.records.ContainerId;
+import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.apache.hadoop.yarn.factory.providers.RecordFactoryProvider;
 import org.apache.hadoop.yarn.server.nodemanager.containermanager.container.Container;
 import org.apache.hadoop.yarn.server.nodemanager.containermanager.container.ContainerDiagnosticsUpdateEvent;
@@ -98,7 +99,7 @@ public class DefaultContainerExecutor ex
     String appIdStr =
         ConverterUtils.toString(container.getContainerID().getAppId());
     String[] sLocalDirs =
-        getConf().getStrings(NMConfig.NM_LOCAL_DIR, NMConfig.DEFAULT_NM_LOCAL_DIR);
+        getConf().getStrings(YarnConfiguration.NM_LOCAL_DIRS, YarnConfiguration.DEFAULT_NM_LOCAL_DIRS);
     for (String sLocalDir : sLocalDirs) {
       Path usersdir = new Path(sLocalDir, ContainerLocalizer.USERCACHE);
       Path userdir = new Path(usersdir, userName);
@@ -358,7 +359,7 @@ public class DefaultContainerExecutor ex
       throws IOException {
     String[] rootLogDirs =
         getConf()
-            .getStrings(NMConfig.NM_LOG_DIR, NMConfig.DEFAULT_NM_LOG_DIR);
+            .getStrings(YarnConfiguration.NM_LOG_DIRS, YarnConfiguration.DEFAULT_NM_LOG_DIRS);
     
     boolean appLogDirStatus = false;
     FsPermission appLogDirPerms = new FsPermission(LOGDIR_PERM);
@@ -386,7 +387,7 @@ public class DefaultContainerExecutor ex
       throws IOException {
     String[] rootLogDirs =
         getConf()
-            .getStrings(NMConfig.NM_LOG_DIR, NMConfig.DEFAULT_NM_LOG_DIR);
+            .getStrings(YarnConfiguration.NM_LOG_DIRS, YarnConfiguration.DEFAULT_NM_LOG_DIRS);
     
     boolean containerLogDirStatus = false;
     FsPermission containerLogDirPerms = new FsPermission(LOGDIR_PERM);

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DeletionService.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DeletionService.java?rev=1166955&r1=1166954&r2=1166955&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DeletionService.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DeletionService.java Fri Sep  9 01:44:58 2011
@@ -28,21 +28,15 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileContext;
 import org.apache.hadoop.fs.UnsupportedFileSystemException;
+import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.apache.hadoop.yarn.server.nodemanager.ContainerExecutor;
 import org.apache.hadoop.yarn.service.AbstractService;
 
-import static org.apache.hadoop.yarn.server.nodemanager.NMConfig.*;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
 public class DeletionService extends AbstractService {
-
   static final Log LOG = LogFactory.getLog(DeletionService.class);
-  /** Delay before deleting resource to ease debugging of NM issues */
-  static final String DEBUG_DELAY_SEC =
-    NMConfig.NM_PREFIX + "debug.delete.delay";
-
   private int debugDelay;
   private final ContainerExecutor exec;
   private ScheduledThreadPoolExecutor sched;
@@ -79,10 +73,10 @@ public class DeletionService extends Abs
   public void init(Configuration conf) {
     if (conf != null) {
       sched = new ScheduledThreadPoolExecutor(
-          conf.getInt(NM_MAX_DELETE_THREADS, DEFAULT_MAX_DELETE_THREADS));
-      debugDelay = conf.getInt(DEBUG_DELAY_SEC, 0);
+          conf.getInt(YarnConfiguration.NM_DELETE_THREAD_COUNT, YarnConfiguration.DEFAULT_NM_DELETE_THREAD_COUNT));
+      debugDelay = conf.getInt(YarnConfiguration.DEBUG_NM_DELETE_DELAY_SEC, 0);
     } else {
-      sched = new ScheduledThreadPoolExecutor(DEFAULT_MAX_DELETE_THREADS);
+      sched = new ScheduledThreadPoolExecutor(YarnConfiguration.DEFAULT_NM_DELETE_THREAD_COUNT);
     }
     sched.setKeepAliveTime(60L, SECONDS);
     super.init(conf);

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/LinuxContainerExecutor.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/LinuxContainerExecutor.java?rev=1166955&r1=1166954&r2=1166955&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/LinuxContainerExecutor.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/LinuxContainerExecutor.java Fri Sep  9 01:44:58 2011
@@ -33,6 +33,7 @@ import org.apache.hadoop.util.Shell.Exit
 import org.apache.hadoop.util.Shell.ShellCommandExecutor;
 import org.apache.hadoop.util.StringUtils;
 import org.apache.hadoop.yarn.api.records.ContainerId;
+import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.apache.hadoop.yarn.server.nodemanager.containermanager.container.Container;
 import org.apache.hadoop.yarn.server.nodemanager.containermanager.container.ContainerDiagnosticsUpdateEvent;
 import org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ContainerLocalizer;
@@ -44,8 +45,6 @@ public class LinuxContainerExecutor exte
       .getLog(LinuxContainerExecutor.class);
 
   private String containerExecutorExe;
-  protected static final String CONTAINER_EXECUTOR_EXEC_KEY =
-    NMConfig.NM_PREFIX + "linux-container-executor.path";
   
   @Override
   public void setConf(Configuration conf) {
@@ -98,7 +97,7 @@ public class LinuxContainerExecutor exte
       new File(hadoopBin, "container-executor").getAbsolutePath();
     return null == conf
       ? defaultPath
-      : conf.get(CONTAINER_EXECUTOR_EXEC_KEY, defaultPath);
+      : conf.get(YarnConfiguration.NM_LINUX_CONTAINER_EXECUTOR_PATH, defaultPath);
   }
 
   @Override

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeManager.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeManager.java?rev=1166955&r1=1166954&r2=1166955&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeManager.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeManager.java Fri Sep  9 01:44:58 2011
@@ -18,9 +18,6 @@
 
 package org.apache.hadoop.yarn.server.nodemanager;
 
-import static org.apache.hadoop.yarn.server.nodemanager.NMConfig.NM_CONTAINER_EXECUTOR_CLASS;
-import static org.apache.hadoop.yarn.server.nodemanager.NMConfig.NM_KEYTAB;
-
 import java.io.IOException;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
@@ -42,7 +39,6 @@ import org.apache.hadoop.yarn.conf.YarnC
 import org.apache.hadoop.yarn.event.AsyncDispatcher;
 import org.apache.hadoop.yarn.event.Dispatcher;
 import org.apache.hadoop.yarn.factory.providers.RecordFactoryProvider;
-import org.apache.hadoop.yarn.server.YarnServerConfig;
 import org.apache.hadoop.yarn.server.nodemanager.containermanager.ContainerManagerImpl;
 import org.apache.hadoop.yarn.server.nodemanager.containermanager.application.Application;
 import org.apache.hadoop.yarn.server.nodemanager.containermanager.container.Container;
@@ -82,8 +78,8 @@ public class NodeManager extends Composi
   }
 
   protected void doSecureLogin() throws IOException {
-    SecurityUtil.login(getConfig(), NM_KEYTAB,
-        YarnServerConfig.NM_SERVER_PRINCIPAL_KEY);
+    SecurityUtil.login(getConfig(), YarnConfiguration.NM_KEYTAB,
+        YarnConfiguration.NM_PRINCIPAL);
   }
 
   @Override
@@ -92,7 +88,7 @@ public class NodeManager extends Composi
     Context context = new NMContext();
 
     ContainerExecutor exec = ReflectionUtils.newInstance(
-        conf.getClass(NM_CONTAINER_EXECUTOR_CLASS,
+        conf.getClass(YarnConfiguration.NM_CONTAINER_EXECUTOR,
           DefaultContainerExecutor.class, ContainerExecutor.class), conf);
     DeletionService del = new DeletionService(exec);
     addService(del);

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java?rev=1166955&r1=1166954&r2=1166955&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java Fri Sep  9 01:44:58 2011
@@ -47,7 +47,6 @@ import org.apache.hadoop.yarn.factories.
 import org.apache.hadoop.yarn.factory.providers.RecordFactoryProvider;
 import org.apache.hadoop.yarn.ipc.YarnRPC;
 import org.apache.hadoop.yarn.server.RMNMSecurityInfoClass;
-import org.apache.hadoop.yarn.server.YarnServerConfig;
 import org.apache.hadoop.yarn.server.api.ResourceTracker;
 import org.apache.hadoop.yarn.server.api.protocolrecords.NodeHeartbeatRequest;
 import org.apache.hadoop.yarn.server.api.protocolrecords.RegisterNodeManagerRequest;
@@ -98,12 +97,12 @@ public class NodeStatusUpdaterImpl exten
   @Override
   public synchronized void init(Configuration conf) {
     this.rmAddress =
-        conf.get(YarnServerConfig.RESOURCETRACKER_ADDRESS,
-            YarnServerConfig.DEFAULT_RESOURCETRACKER_BIND_ADDRESS);
+        conf.get(YarnConfiguration.RM_RESOURCE_TRACKER_ADDRESS,
+            YarnConfiguration.RM_RESOURCE_TRACKER_ADDRESS);
     this.heartBeatInterval =
-        conf.getLong(NMConfig.HEARTBEAT_INTERVAL,
-            NMConfig.DEFAULT_HEARTBEAT_INTERVAL);
-    int memory = conf.getInt(NMConfig.NM_VMEM_GB, NMConfig.DEFAULT_NM_VMEM_GB);
+        conf.getLong(YarnConfiguration.NM_TO_RM_HEARTBEAT_INTERVAL_MS,
+            YarnConfiguration.DEFAULT_NM_TO_RM_HEARTBEAT_INTERVAL_MS);
+    int memory = conf.getInt(YarnConfiguration.NM_VMEM_GB, YarnConfiguration.DEFAULT_NM_VMEM_GB);
     this.totalResource = recordFactory.newRecordInstance(Resource.class);
     this.totalResource.setMemory(memory * 1024);
     metrics.addResource(totalResource);
@@ -113,13 +112,13 @@ public class NodeStatusUpdaterImpl exten
   @Override
   public void start() {
     String cmBindAddressStr =
-        getConfig().get(NMConfig.NM_BIND_ADDRESS,
-            NMConfig.DEFAULT_NM_BIND_ADDRESS);
+        getConfig().get(YarnConfiguration.NM_ADDRESS,
+            YarnConfiguration.DEFAULT_NM_ADDRESS);
     InetSocketAddress cmBindAddress =
         NetUtils.createSocketAddr(cmBindAddressStr);
     String httpBindAddressStr =
-      getConfig().get(NMConfig.NM_HTTP_BIND_ADDRESS,
-          NMConfig.DEFAULT_NM_HTTP_BIND_ADDRESS);
+      getConfig().get(YarnConfiguration.NM_WEBAPP_ADDRESS,
+          YarnConfiguration.DEFAULT_NM_WEBAPP_ADDRESS);
     InetSocketAddress httpBindAddress =
       NetUtils.createSocketAddr(httpBindAddressStr);
     try {

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/AuxServices.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/AuxServices.java?rev=1166955&r1=1166954&r2=1166955&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/AuxServices.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/AuxServices.java Fri Sep  9 01:44:58 2011
@@ -31,6 +31,7 @@ import org.apache.hadoop.conf.Configurat
 import org.apache.hadoop.util.ReflectionUtils;
 import org.apache.hadoop.yarn.api.records.ApplicationId;
 import org.apache.hadoop.yarn.api.records.ContainerId;
+import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.apache.hadoop.yarn.event.EventHandler;
 import org.apache.hadoop.yarn.service.AbstractService;
 import org.apache.hadoop.yarn.service.Service;
@@ -41,9 +42,6 @@ public class AuxServices extends Abstrac
 
   private static final Log LOG = LogFactory.getLog(AuxServices.class);
 
-  public static final String AUX_SERVICES = "nodemanager.auxiluary.services";
-  public static final String AUX_SERVICE_CLASS_FMT =
-    "nodemanager.aux.service.%s.class";
   public final Map<String,AuxiliaryService> serviceMap;
   public final Map<String,ByteBuffer> serviceMeta;
 
@@ -85,11 +83,12 @@ public class AuxServices extends Abstrac
 
   @Override
   public void init(Configuration conf) {
-    Collection<String> auxNames = conf.getStringCollection(AUX_SERVICES);
+    Collection<String> auxNames = conf.getStringCollection(
+        YarnConfiguration.NM_AUX_SERVICES);
     for (final String sName : auxNames) {
       try {
         Class<? extends AuxiliaryService> sClass = conf.getClass(
-              String.format(AUX_SERVICE_CLASS_FMT, sName), null,
+              String.format(YarnConfiguration.NM_AUX_SERVICE_FMT, sName), null,
               AuxiliaryService.class);
         if (null == sClass) {
           throw new RuntimeException("No class defiend for " + sName);



Mime
View raw message