You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2017/08/02 12:46:58 UTC

[7/7] flink git commit: [FLINK-7304] [scripts] Simplify taskmanager GC configuration

[FLINK-7304] [scripts] Simplify taskmanager GC configuration

This closes #4427.


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

Branch: refs/heads/master
Commit: 6ade949a085721d46ba50ec81dfba033c475917c
Parents: 3ed18ed
Author: zentol <ch...@apache.org>
Authored: Mon Jul 31 12:18:07 2017 +0200
Committer: zentol <ch...@apache.org>
Committed: Wed Aug 2 14:46:15 2017 +0200

----------------------------------------------------------------------
 flink-dist/src/main/flink-bin/bin/taskmanager.sh | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/6ade949a/flink-dist/src/main/flink-bin/bin/taskmanager.sh
----------------------------------------------------------------------
diff --git a/flink-dist/src/main/flink-bin/bin/taskmanager.sh b/flink-dist/src/main/flink-bin/bin/taskmanager.sh
index 3cf74ca..86ad844 100755
--- a/flink-dist/src/main/flink-bin/bin/taskmanager.sh
+++ b/flink-dist/src/main/flink-bin/bin/taskmanager.sh
@@ -42,17 +42,7 @@ if [[ $STARTSTOP == "start" ]] || [[ $STARTSTOP == "start-foreground" ]]; then
     # if memory allocation mode is lazy and no other JVM options are set,
     # set the 'Concurrent Mark Sweep GC'
     if [[ $FLINK_TM_MEM_PRE_ALLOCATE == "false" ]] && [ -z "${FLINK_ENV_JAVA_OPTS}" ] && [ -z "${FLINK_ENV_JAVA_OPTS_TM}" ]; then
-
-        JAVA_VERSION=$($JAVA_RUN -version 2>&1 | sed 's/.*version "\(.*\)\.\(.*\)\..*"/\1\2/; 1q')
-
-        # set the GC to G1 in Java 8 and to CMS in Java 7
-        if [[ ${JAVA_VERSION} =~ ${IS_NUMBER} ]]; then
-            if [ "$JAVA_VERSION" -lt 18 ]; then
-                export JVM_ARGS="$JVM_ARGS -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled"
-            else
-                export JVM_ARGS="$JVM_ARGS -XX:+UseG1GC"
-            fi
-        fi
+        export JVM_ARGS="$JVM_ARGS -XX:+UseG1GC"
     fi
 
     if [[ ! ${FLINK_TM_HEAP} =~ ${IS_NUMBER} ]] || [[ "${FLINK_TM_HEAP}" -lt "0" ]]; then