flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject flink git commit: [FLINK-2132] [scripts] Fix java version extraction
Date Tue, 02 Jun 2015 09:31:14 GMT
Repository: flink
Updated Branches:
  refs/heads/master 572a45b37 -> d22e9f860


[FLINK-2132] [scripts] Fix java version extraction


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

Branch: refs/heads/master
Commit: d22e9f86073227ecd079703e535cb3dec3f6228e
Parents: 572a45b
Author: Ufuk Celebi <uce@apache.org>
Authored: Tue Jun 2 11:21:51 2015 +0200
Committer: Ufuk Celebi <uce@apache.org>
Committed: Tue Jun 2 11:30:27 2015 +0200

----------------------------------------------------------------------
 flink-dist/src/main/flink-bin/bin/jobmanager.sh  | 9 ++++++---
 flink-dist/src/main/flink-bin/bin/taskmanager.sh | 9 ++++++---
 2 files changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/d22e9f86/flink-dist/src/main/flink-bin/bin/jobmanager.sh
----------------------------------------------------------------------
diff --git a/flink-dist/src/main/flink-bin/bin/jobmanager.sh b/flink-dist/src/main/flink-bin/bin/jobmanager.sh
index 3a94871..afe35d8 100755
--- a/flink-dist/src/main/flink-bin/bin/jobmanager.sh
+++ b/flink-dist/src/main/flink-bin/bin/jobmanager.sh
@@ -27,10 +27,13 @@ bin=`cd "$bin"; pwd`
 
 . "$bin"/config.sh
 
-JAVA_VERSION=$($JAVA_RUN -version 2>&1 | sed 's/java version "\(.*\)\.\(.*\)\..*"/\1\2/;
1q')
+JAVA_VERSION=$($JAVA_RUN -version 2>&1 | sed 's/.*version "\(.*\)\.\(.*\)\..*"/\1\2/;
1q')
 
-if [ "$JAVA_VERSION" -lt 18 ]; then
-    JVM_ARGS="$JVM_ARGS -XX:MaxPermSize=256m"
+# Only set JVM 8 arguments if we have correctly extracted the version
+if [[ ${JAVA_VERSION} =~ ${IS_NUMBER} ]]; then
+    if [ "$JAVA_VERSION" -lt 18 ]; then
+        JVM_ARGS="$JVM_ARGS -XX:MaxPermSize=256m"
+    fi
 fi
 
 if [ "$FLINK_IDENT_STRING" = "" ]; then

http://git-wip-us.apache.org/repos/asf/flink/blob/d22e9f86/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 74b241d..a35ad77 100755
--- a/flink-dist/src/main/flink-bin/bin/taskmanager.sh
+++ b/flink-dist/src/main/flink-bin/bin/taskmanager.sh
@@ -37,10 +37,13 @@ out=$FLINK_LOG_DIR/flink-$FLINK_IDENT_STRING-taskmanager-$HOSTNAME.out
 pid=$FLINK_PID_DIR/flink-$FLINK_IDENT_STRING-taskmanager.pid
 log_setting=(-Dlog.file="$log" -Dlog4j.configuration=file:"$FLINK_CONF_DIR"/log4j.properties
-Dlogback.configurationFile=file:"$FLINK_CONF_DIR"/logback.xml)
 
-JAVA_VERSION=$($JAVA_RUN -version 2>&1 | sed 's/java version "\(.*\)\.\(.*\)\..*"/\1\2/;
1q')
+JAVA_VERSION=$($JAVA_RUN -version 2>&1 | sed 's/.*version "\(.*\)\.\(.*\)\..*"/\1\2/;
1q')
 
-if [ "$JAVA_VERSION" -lt 18 ]; then
-    JVM_ARGS="$JVM_ARGS -XX:MaxPermSize=256m"
+# Only set JVM 8 arguments if we have correctly extracted the version
+if [[ ${JAVA_VERSION} =~ ${IS_NUMBER} ]]; then
+    if [ "$JAVA_VERSION" -lt 18 ]; then
+        JVM_ARGS="$JVM_ARGS -XX:MaxPermSize=256m"
+    fi
 fi
 
 case $STARTSTOP in


Mime
View raw message