From b088524750074d23be84de2f8716c1787cd37a37 Mon Sep 17 00:00:00 2001 From: Jason Darrell Lowe Date: Mon, 10 Jun 2013 18:12:36 +0000 Subject: [PATCH] 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/trunk@1491548 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../hadoop-common/src/main/bin/hadoop-config.sh | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 6eb550062c..e6f6e77bf3 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -571,6 +571,9 @@ Release 2.1.0-beta - UNRELEASED HADOOP-9605. Update junit dependency. (Timothy St. Clair via cos) + HADOOP-9581. hadoop --config non-existent directory should result in error + (Ashwin Shankar via jlowe) + BREAKDOWN OF HADOOP-8562 SUBTASKS AND RELATED JIRAS HADOOP-8924. Hadoop Common creating package-info.java must not depend on 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 5e9e684612..ea66af59d5 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 @@ -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