hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject hadoop git commit: HADOOP-11058. Missing HADOOP_CONF_DIR generates strange results (Masatake Iwasaki via aw)
Date Tue, 06 Jan 2015 20:02:12 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 4cd66f7fb -> cd7d78914


HADOOP-11058. Missing HADOOP_CONF_DIR generates strange results (Masatake Iwasaki via aw)


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

Branch: refs/heads/trunk
Commit: cd7d78914cd2929e42b5a893769acefdd2ed6451
Parents: 4cd66f7
Author: Allen Wittenauer <aw@apache.org>
Authored: Tue Jan 6 12:02:03 2015 -0800
Committer: Allen Wittenauer <aw@apache.org>
Committed: Tue Jan 6 12:02:03 2015 -0800

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt             | 3 +++
 .../hadoop-common/src/main/bin/hadoop-config.sh             | 1 +
 .../hadoop-common/src/main/bin/hadoop-functions.sh          | 9 +++++++++
 3 files changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/cd7d7891/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 4ceb77d..e7a2061 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -143,6 +143,9 @@ Trunk (Unreleased)
 
     HADOOP-10788. Rewrite kms to use new shell framework (John Smith via aw)
 
+    HADOOP-11058. Missing HADOOP_CONF_DIR generates strange results
+    (Masatake Iwasaki via aw)
+
   BUG FIXES
 
     HADOOP-9451. Fault single-layer config if node group topology is enabled.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/cd7d7891/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 06fb0ef..d9fd6e6 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
@@ -169,6 +169,7 @@ hadoop_exec_userfuncs
 #
 
 hadoop_exec_hadooprc
+hadoop_verify_confdir
 
 # do all the OS-specific startup bits here
 # this allows us to get a decent JAVA_HOME,

http://git-wip-us.apache.org/repos/asf/hadoop/blob/cd7d7891/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 799aad0..2d8e90e 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
@@ -92,6 +92,15 @@ function hadoop_find_confdir
   hadoop_debug "HADOOP_CONF_DIR=${HADOOP_CONF_DIR}"
 }
 
+function hadoop_verify_confdir
+{
+  # Check only log4j.properties by default.
+  # --loglevel does not work without logger settings in log4j.log4j.properties.
+  if [[ ! -f "${HADOOP_CONF_DIR}/log4j.properties" ]]; then
+    hadoop_error "WARNING: log4j.properties is not found. HADOOP_CONF_DIR may be incomplete."
+  fi
+}
+
 function hadoop_exec_hadoopenv
 {
   # NOTE: This function is not user replaceable.


Mime
View raw message