diff options
author | Jon Bratseth <bratseth@gmail.com> | 2021-06-09 15:35:15 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2021-06-09 15:35:15 +0200 |
commit | 0a77194d4d6f7dc9dd7843234ca9cb84083a1f07 (patch) | |
tree | 8e6f6f85ba2826e9cef0fe34f5f0da34488613c7 /vespaclient-java/src/main/sh | |
parent | 68494aacc08582a34e5558c83abba797d350cfa6 (diff) |
Allow -Xmx to be specified as an argument to vespa-visit
Diffstat (limited to 'vespaclient-java/src/main/sh')
-rwxr-xr-x | vespaclient-java/src/main/sh/vespa-visit.sh | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/vespaclient-java/src/main/sh/vespa-visit.sh b/vespaclient-java/src/main/sh/vespa-visit.sh index 92d6bc67f3f..bcabf40c5c7 100755 --- a/vespaclient-java/src/main/sh/vespa-visit.sh +++ b/vespaclient-java/src/main/sh/vespa-visit.sh @@ -74,16 +74,30 @@ findhost # END environment bootstrap section +# Allow -Xmx to be specified in args +for arg in "$@"; do + shift + if case $arg in -Xmx*) true;; *) false;; esac; then # portable if [string begins with] + export Xmx=$arg + else + set -- "$@" "$arg" + fi +done + +if [ "${VESPA_LOG_LEVEL}" = "" ]; then + export VESPA_LOG_LEVEL=error,warning +fi + if [ "${VESPA_LOG_LEVEL}" = "" ]; then export VESPA_LOG_LEVEL=error,warning fi -export MALLOC_ARENA_MAX=1 #Does not need fast allocation -exec java \ +export MALLOC_ARENA_MAX=1 # Does not need fast allocation +echo exec java \ -server -enableassertions \ -XX:ThreadStackSize=512 \ -XX:MaxJavaStackTraceDepth=1000000 \ -Djava.library.path=${VESPA_HOME}/libexec64/native:${VESPA_HOME}/lib64 \ -XX:MaxDirectMemorySize=32m -Djava.awt.headless=true \ --Xms128m -Xmx1024m $(getJavaOptionsIPV46) \ +-Xms128m -Xmx1024m $(getJavaOptionsIPV46) ${Xmx} \ -cp ${VESPA_HOME}/lib/jars/vespaclient-java-jar-with-dependencies.jar com.yahoo.vespavisit.VdsVisit "$@" |