flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aljos...@apache.org
Subject [1/2] flink git commit: [FLINK-7480] Set HADOOP_CONF_DIR to sane default if not set
Date Mon, 21 Aug 2017 13:45:50 GMT
Repository: flink
Updated Branches:
  refs/heads/master bd70a0001 -> a3143bcb0


[FLINK-7480] Set HADOOP_CONF_DIR to sane default if not set

This improves the out-of-box experience on GCE and AWS, both of which
don't set HADOOP_CONF_DIR by default but use /etc/hadoop/conf


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

Branch: refs/heads/master
Commit: a3143bcb0dd2895025bd6f693f4240604a5f1840
Parents: 0a0f6ed
Author: Aljoscha Krettek <aljoscha.krettek@gmail.com>
Authored: Fri Aug 18 16:40:55 2017 +0200
Committer: Aljoscha Krettek <aljoscha.krettek@gmail.com>
Committed: Mon Aug 21 15:44:59 2017 +0200

----------------------------------------------------------------------
 flink-dist/src/main/flink-bin/bin/config.sh | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/a3143bcb/flink-dist/src/main/flink-bin/bin/config.sh
----------------------------------------------------------------------
diff --git a/flink-dist/src/main/flink-bin/bin/config.sh b/flink-dist/src/main/flink-bin/bin/config.sh
index ee21306..3055999 100755
--- a/flink-dist/src/main/flink-bin/bin/config.sh
+++ b/flink-dist/src/main/flink-bin/bin/config.sh
@@ -351,6 +351,14 @@ if [ -z "$HADOOP_CONF_DIR" ]; then
     fi
 fi
 
+# try and set HADOOP_CONF_DIR to some common default if it's not set
+if [ -z "$HADOOP_CONF_DIR" ]; then
+    if [ -d "/etc/hadoop/conf" ]; then
+        echo "Setting HADOOP_CONF_DIR=/etc/hadoop/conf because no HADOOP_CONF_DIR was set."
+        HADOOP_CONF_DIR="/etc/hadoop/conf"
+    fi
+fi
+
 INTERNAL_HADOOP_CLASSPATHS="${HADOOP_CLASSPATH}:${HADOOP_CONF_DIR}:${YARN_CONF_DIR}"
 
 # check if the "hadoop" binary is available, if yes, use that to augment the CLASSPATH


Mime
View raw message