flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmetz...@apache.org
Subject flink git commit: [FLINK-3678] [dist, docs] Make Flink logs directory configurable
Date Mon, 25 Apr 2016 10:18:09 GMT
Repository: flink
Updated Branches:
  refs/heads/release-1.0 08361a941 -> f80f6d602


[FLINK-3678] [dist, docs] Make Flink logs directory configurable

* Edit config.sh
* Document the newly defined log directory configuration key

This closes #1837


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

Branch: refs/heads/release-1.0
Commit: f80f6d602885cb3747cdf2c6e0b01eda74fa589b
Parents: 08361a9
Author: Stefano Baghino <stefano.baghino@radicalbit.io>
Authored: Tue Mar 29 19:10:46 2016 +0200
Committer: Robert Metzger <rmetzger@apache.org>
Committed: Mon Apr 25 12:17:38 2016 +0200

----------------------------------------------------------------------
 docs/setup/config.md                        | 4 ++++
 flink-dist/src/main/flink-bin/bin/config.sh | 7 ++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/f80f6d60/docs/setup/config.md
----------------------------------------------------------------------
diff --git a/docs/setup/config.md b/docs/setup/config.md
index 992fddd..d39cf9c 100644
--- a/docs/setup/config.md
+++ b/docs/setup/config.md
@@ -275,6 +275,10 @@ For example when running Flink on YARN on an environment with a restrictive
fire
 
 - `recovery.job.delay`: (Default 'akka.ask.timeout') Defines the delay before persisted jobs
are recovered in case of a recovery situation. 
 
+## Environment
+
+- `env.log.dir`: (Defaults to the `log` directory under Flink's home) Defines the directory
where the Flink logs are saved. It has to be an absolute path.
+
 ## Background
 
 ### Configuring the Network Buffers

http://git-wip-us.apache.org/repos/asf/flink/blob/f80f6d60/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 8faf951..43619ce 100755
--- a/flink-dist/src/main/flink-bin/bin/config.sh
+++ b/flink-dist/src/main/flink-bin/bin/config.sh
@@ -95,6 +95,7 @@ KEY_TASKM_OFFHEAP="taskmanager.memory.off-heap"
 KEY_TASKM_MEM_PRE_ALLOCATE="taskmanager.memory.preallocate"
 
 KEY_ENV_PID_DIR="env.pid.dir"
+KEY_ENV_LOG_DIR="env.log.dir"
 KEY_ENV_LOG_MAX="env.log.max"
 KEY_ENV_JAVA_HOME="env.java.home"
 KEY_ENV_JAVA_OPTS="env.java.opts"
@@ -136,7 +137,7 @@ FLINK_LIB_DIR=$FLINK_ROOT_DIR/lib
 FLINK_ROOT_DIR_MANGLED=`manglePath "$FLINK_ROOT_DIR"`
 if [ -z "$FLINK_CONF_DIR" ]; then FLINK_CONF_DIR=$FLINK_ROOT_DIR_MANGLED/conf; fi
 FLINK_BIN_DIR=$FLINK_ROOT_DIR_MANGLED/bin
-FLINK_LOG_DIR=$FLINK_ROOT_DIR_MANGLED/log
+DEFAULT_FLINK_LOG_DIR=$FLINK_ROOT_DIR_MANGLED/log
 FLINK_CONF_FILE="flink-conf.yaml"
 YAML_CONF=${FLINK_CONF_DIR}/${FLINK_CONF_FILE}
 
@@ -211,6 +212,10 @@ if [ -z "${MAX_LOG_FILE_NUMBER}" ]; then
     MAX_LOG_FILE_NUMBER=$(readFromConfig ${KEY_ENV_LOG_MAX} ${DEFAULT_ENV_LOG_MAX} "${YAML_CONF}")
 fi
 
+if [ -z "${FLINK_LOG_DIR}" ]; then
+    FLINK_LOG_DIR=$(readFromConfig ${KEY_ENV_LOG_DIR} "${DEFAULT_FLINK_LOG_DIR}" "${YAML_CONF}")
+fi
+
 if [ -z "${FLINK_PID_DIR}" ]; then
     FLINK_PID_DIR=$(readFromConfig ${KEY_ENV_PID_DIR} "${DEFAULT_ENV_PID_DIR}" "${YAML_CONF}")
 fi


Mime
View raw message