Repository: hadoop
Updated Branches:
  refs/heads/trunk 390642acf -> 8e9a26681


HADOOP-11353. Add support for .hadooprc (aw)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/8e9a2668
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/8e9a2668
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/8e9a2668

Branch: refs/heads/trunk
Commit: 8e9a2668195d69e30cfce51fda6ad2bd6c1466ed
Parents: 390642a
Author: Allen Wittenauer <[email protected]>
Authored: Thu Dec 11 09:00:35 2014 -0800
Committer: Allen Wittenauer <[email protected]>
Committed: Thu Dec 11 09:00:35 2014 -0800

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt          |  2 ++
 .../hadoop-common/src/main/bin/hadoop-config.sh          |  2 ++
 .../hadoop-common/src/main/bin/hadoop-functions.sh       | 11 +++++++++++
 3 files changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/8e9a2668/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt 
b/hadoop-common-project/hadoop-common/CHANGES.txt
index 8a4f13c..47d36e4 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -26,6 +26,8 @@ Trunk (Unreleased)
     Alexander Stojanovich, Brian Swan, and Min Wei via cnauroth)
 
     HADOOP-6590. Add a username check for hadoop sub-commands (John Smith via 
aw)
+
+    HADOOP-11353. Add support for .hadooprc (aw)
     
   IMPROVEMENTS
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8e9a2668/hadoop-common-project/hadoop-common/src/main/bin/hadoop-config.sh
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-config.sh 
b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-config.sh
index 89b0c93..06fb0ef 100644
--- a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-config.sh
+++ b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-config.sh
@@ -168,6 +168,8 @@ hadoop_exec_userfuncs
 # IMPORTANT! User provided code is now available!
 #
 
+hadoop_exec_hadooprc
+
 # do all the OS-specific startup bits here
 # this allows us to get a decent JAVA_HOME,
 # call crle for LD_LIBRARY_PATH, etc.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8e9a2668/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
----------------------------------------------------------------------
diff --git 
a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh 
b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
index dfd7315..af45cec 100644
--- a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
+++ b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
@@ -113,6 +113,17 @@ function hadoop_exec_userfuncs
   fi
 }
 
+function hadoop_exec_hadooprc
+{
+  # Read the user's settings.  This provides for users to override 
+  # and/or append hadoop-env.sh. It is not meant as a complete system override.
+
+  if [[ -f "${HOME}/.hadooprc" ]]; then
+    hadoop_debug "Applying the user's .hadooprc"
+    . "${HOME}/.hadooprc"
+  fi
+}
+
 function hadoop_basic_init
 {
   # Some of these are also set in hadoop-env.sh.

Reply via email to