Browse Source

svn merge -c 1491548 FIXES: HADOOP-9581. hadoop --config non-existent directory should result in error. Contributed by Ashwin Shankar

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1491554 13f79535-47bb-0310-9956-ffa450edef68
Jason Darrell Lowe 12 năm trước cách đây
mục cha
commit
02e55b3caa

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

@@ -12,6 +12,9 @@ Release 0.23.9 - UNRELEASED
 
   BUG FIXES
 
+    HADOOP-9581. hadoop --config non-existent directory should result in error
+    (Ashwin Shankar via jlowe)
+
 Release 0.23.8 - 2013-06-05
   
   INCOMPATIBLE CHANGES

+ 4 - 0
hadoop-common-project/hadoop-common/src/main/bin/hadoop-config.sh

@@ -60,6 +60,10 @@ then
 	  then
 	      shift
 	      confdir=$1
+	      if [ ! -d "$confdir" ]; then
+                echo "Error: Cannot find configuration directory: $confdir"
+                exit 1
+             fi
 	      shift
 	      HADOOP_CONF_DIR=$confdir
     fi