You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by rm...@apache.org on 2020/06/11 08:01:26 UTC
[flink] branch release-1.11 updated: [FLINK-18160][scripts] Do not
log about HADOOP_CONF_DIR if HADOOP_CLASSPATH is set
This is an automated email from the ASF dual-hosted git repository.
rmetzger pushed a commit to branch release-1.11
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.11 by this push:
new 6878fab [FLINK-18160][scripts] Do not log about HADOOP_CONF_DIR if HADOOP_CLASSPATH is set
6878fab is described below
commit 6878fab5165c3f6d03e25fbab05c794a44d6f50f
Author: Robert Metzger <rm...@apache.org>
AuthorDate: Tue Jun 9 20:13:24 2020 +0200
[FLINK-18160][scripts] Do not log about HADOOP_CONF_DIR if HADOOP_CLASSPATH is set
---
flink-dist/src/main/flink-bin/bin/config.sh | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/flink-dist/src/main/flink-bin/bin/config.sh b/flink-dist/src/main/flink-bin/bin/config.sh
index 3a9572e..8917be9 100755
--- a/flink-dist/src/main/flink-bin/bin/config.sh
+++ b/flink-dist/src/main/flink-bin/bin/config.sh
@@ -326,20 +326,20 @@ if [ -z "$HADOOP_CONF_DIR" ]; then
if [ -n "$HADOOP_HOME" ]; then
# HADOOP_HOME is set. Check if its a Hadoop 1.x or 2.x HADOOP_HOME path
if [ -d "$HADOOP_HOME/conf" ]; then
- # its a Hadoop 1.x
+ # It's Hadoop 1.x
HADOOP_CONF_DIR="$HADOOP_HOME/conf"
fi
if [ -d "$HADOOP_HOME/etc/hadoop" ]; then
- # Its Hadoop 2.2+
+ # It's Hadoop 2.2+
HADOOP_CONF_DIR="$HADOOP_HOME/etc/hadoop"
fi
fi
fi
-# try and set HADOOP_CONF_DIR to some common default if it's not set
-if [ -z "$HADOOP_CONF_DIR" ]; then
+# if neither HADOOP_CONF_DIR nor HADOOP_CLASSPATH are set, use some common default (if available)
+if [ -z "$HADOOP_CONF_DIR" ] && [ -z "$HADOOP_CLASSPATH" ]; then
if [ -d "/etc/hadoop/conf" ]; then
- echo "Setting HADOOP_CONF_DIR=/etc/hadoop/conf because no HADOOP_CONF_DIR was set."
+ echo "Setting HADOOP_CONF_DIR=/etc/hadoop/conf because no HADOOP_CONF_DIR or HADOOP_CLASSPATH was set."
HADOOP_CONF_DIR="/etc/hadoop/conf"
fi
fi