This is an automated email from the ASF dual-hosted git repository.

zhoubo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-connect.git


The following commit(s) were added to refs/heads/master by this push:
     new b16ac19a do not check Xms/Xms/Xmn parameters (#320)
b16ac19a is described below

commit b16ac19abd3d0c3c7e1a2beccc9d2a70f6a1fa67
Author: Fan Lin <[email protected]>
AuthorDate: Sun Sep 18 23:40:45 2022 +0800

    do not check Xms/Xms/Xmn parameters (#320)
---
 distribution/bin/runconnect.sh | 30 ------------------------------
 1 file changed, 30 deletions(-)

diff --git a/distribution/bin/runconnect.sh b/distribution/bin/runconnect.sh
index 6caa5438..273258e7 100644
--- a/distribution/bin/runconnect.sh
+++ b/distribution/bin/runconnect.sh
@@ -45,32 +45,6 @@ check_java_version ()
   echo $flag
 }
 
-check_java_opts ()
-{
-  export IFS=" "
-  flag="true"
-  count=0
-  for opt in $1; do
-    if [[ $opt == *"-Xms"* ]]; then
-        xms=`echo $opt | tr -d -c 0-9`
-        if [[ $xms -lt 4 ]]; then
-            flag="false"
-        fi
-        (( count++ ))
-    fi
-    if [[ $opt == *"-Xmx"* ]]; then
-        xmx=`echo $opt | tr -d -c 0-9`
-        if [[ $xmx -lt 4 ]]; then
-            flag="false"
-        fi
-        (( count++ ))
-    fi
-  done
-  if [[ $count -lt 2 ]]; then
-      flag="false"
-  fi
-  echo $flag
-}
 
 [ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=$HOME/jdk/java
 [ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=/usr/java
@@ -126,10 +100,6 @@ JAVA_OPT="${JAVA_OPT} -Dtls.server.mode=disabled"
 JAVA_OPT="${JAVA_OPT} -Dtls.private.key.encrypted=false"
 JAVA_OPT="${JAVA_OPT} -Djdk.tls.rejectClientInitiatedRenegotiation=true"
 
-if [[ $(check_java_opts "$JAVA_OPT") == "false" ]]; then
-    error_exit "Too small heap mem size or Xms/Xms/Xmn are missing, we need 
Xms >= 4g, Xmx >= 4g and Xmn >= 2g."
-fi
-
 if [[ $(check_java_version "$JAVA" "1.7") == "false" ]]; then
     error_exit "Java version is too low, we need java(x64) 1.7+!"
 fi

Reply via email to