瀏覽代碼

MAPREDUCE-3280. Removed the unnecessary job user-name configuration in mapred-site.xml. (vinodkv)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1200441 13f79535-47bb-0310-9956-ffa450edef68
Vinod Kumar Vavilapalli 13 年之前
父節點
當前提交
15150cd997

+ 3 - 0
hadoop-mapreduce-project/CHANGES.txt

@@ -70,6 +70,9 @@ Release 0.23.1 - Unreleased
     MAPREDUCE-3336. Replaced guice internal.Preconditions api usage with the
     public Preconditions API. (Thomas Graves via vinodkv)
 
+    MAPREDUCE-3280. Removed the unnecessary job user-name configuration in
+    mapred-site.xml. (vinodkv)
+
   OPTIMIZATIONS
 
   BUG FIXES

+ 2 - 2
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapred/YarnChild.java

@@ -130,8 +130,8 @@ class YarnChild {
 
       // Initiate Java VM metrics
       JvmMetrics.initSingleton(jvmId.toString(), job.getSessionId());
-      LOG.debug("Remote user: " + job.get("user.name"));
-      childUGI = UserGroupInformation.createRemoteUser(job.get("user.name"));
+      childUGI = UserGroupInformation.createRemoteUser(System
+          .getenv(ApplicationConstants.Environment.USER.toString()));
       // Add tokens to new user so that it may execute its task correctly.
       for(Token<?> token : UserGroupInformation.getCurrentUser().getTokens()) {
         childUGI.addToken(token);

+ 0 - 8
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/resources/mapred-default.xml

@@ -1224,12 +1224,4 @@
     mapreduce.job.end-notification.max.retry.interval</description>
 </property>
 
-<property>
-  <name>mapreduce.job.user.name</name>
-  <value>${user.name}</value>
-  <description>The user name for the job submitter, configurable only in
-  non-secure mode. In secure mode Kerberos authentication is necessary.
-  </description>
-</property>
-
 </configuration>

+ 0 - 1
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/MiniMRYarnCluster.java

@@ -71,7 +71,6 @@ public class MiniMRYarnCluster extends MiniYARNCluster {
   @Override
   public void init(Configuration conf) {
     conf.set(MRConfig.FRAMEWORK_NAME, MRConfig.YARN_FRAMEWORK_NAME);
-    conf.set(MRJobConfig.USER_NAME, System.getProperty("user.name"));
     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