From 015abcd8ce1d360830ee2960f1cdc743e09f1629 Mon Sep 17 00:00:00 2001 From: Anu Engineer Date: Mon, 2 Oct 2017 15:40:00 -0700 Subject: [PATCH] HDFS-12576. JournalNodes are getting started, even though dfs.namenode.shared.edits.dir is not configured. Contributed by Bharat Viswanadham. --- hadoop-hdfs-project/hadoop-hdfs/src/main/bin/start-dfs.sh | 2 +- hadoop-hdfs-project/hadoop-hdfs/src/main/bin/stop-dfs.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/start-dfs.sh b/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/start-dfs.sh index 12d5209a6a..dbdf41ece9 100755 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/start-dfs.sh +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/start-dfs.sh @@ -146,7 +146,7 @@ fi JOURNAL_NODES=$("${HADOOP_HDFS_HOME}/bin/hdfs" getconf -journalNodes 2>&-) -if [[ "{$JOURNAL_NODES-}" != $'\n' ]]; then +if [[ "${#JOURNAL_NODES}" != 0 ]]; then echo "Starting journal nodes [${JOURNAL_NODES}]" hadoop_uservar_su hdfs journalnode "${HADOOP_HDFS_HOME}/bin/hdfs" \ diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/stop-dfs.sh b/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/stop-dfs.sh index 92974ded73..3da146ec9a 100755 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/stop-dfs.sh +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/stop-dfs.sh @@ -102,7 +102,7 @@ fi JOURNAL_NODES=$("${HADOOP_HDFS_HOME}/bin/hdfs" getconf -journalNodes 2>&-) -if [[ "{$JOURNAL_NODES-}" != $'\n' ]]; then +if [[ "${#JOURNAL_NODES}" != 0 ]]; then echo "Stopping journal nodes [${JOURNAL_NODES}]" hadoop_uservar_su hdfs journalnode "${HADOOP_HDFS_HOME}/bin/hdfs" \