You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by al...@apache.org on 2017/08/21 13:45:50 UTC
[1/2] flink git commit: [FLINK-7480] Set HADOOP_CONF_DIR to sane
default if not set
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 <al...@gmail.com>
Authored: Fri Aug 18 16:40:55 2017 +0200
Committer: Aljoscha Krettek <al...@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
[2/2] flink git commit: [FLINK-7477] Use "hadoop classpath" to
augment classpath when available
Posted by al...@apache.org.
[FLINK-7477] Use "hadoop classpath" to augment classpath when available
This improves the out-of-box experience on GCE and AWS, both of which
don't set a HADOOP_CLASSPATH but have "hadoop" available on the $PATH.
Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/0a0f6ed6
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/0a0f6ed6
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/0a0f6ed6
Branch: refs/heads/master
Commit: 0a0f6ed6c3d6cff702e4322293340274bea5e7d9
Parents: bd70a00
Author: Aljoscha Krettek <al...@gmail.com>
Authored: Fri Aug 18 16:39:41 2017 +0200
Committer: Aljoscha Krettek <al...@gmail.com>
Committed: Mon Aug 21 15:44:59 2017 +0200
----------------------------------------------------------------------
flink-dist/src/main/flink-bin/bin/config.sh | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flink/blob/0a0f6ed6/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 69f1562..ee21306 100755
--- a/flink-dist/src/main/flink-bin/bin/config.sh
+++ b/flink-dist/src/main/flink-bin/bin/config.sh
@@ -353,6 +353,12 @@ 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
+if command -v hadoop >/dev/null 2>&1; then
+ echo "Using the result of 'hadoop classpath' to augment the Hadoop classpath: `hadoop classpath`"
+ INTERNAL_HADOOP_CLASSPATHS="${INTERNAL_HADOOP_CLASSPATHS}:`hadoop classpath`"
+fi
+
if [ -n "${HBASE_CONF_DIR}" ]; then
# Look for hbase command in HBASE_HOME or search PATH.
if [ -n "${HBASE_HOME}" ]; then