This is an automated email from the ASF dual-hosted git repository. sergeychugunov pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push: new 1094fff IGNITE-13478 Removal of JMX default configuration. - Fixes #8304. 1094fff is described below commit 1094fff4df636fec1c807a8572597c5178a34b32 Author: Semyon Danilov <samvi...@yandex.ru> AuthorDate: Thu Oct 22 10:01:30 2020 +0300 IGNITE-13478 Removal of JMX default configuration. - Fixes #8304. Signed-off-by: Sergey Chugunov <sergey.chugu...@gmail.com> --- bin/control.bat | 38 +---- bin/control.sh | 15 +- bin/ignite.bat | 39 +---- bin/ignite.sh | 19 +-- bin/include/functions.sh | 25 --- bin/include/parseargs.bat | 1 - bin/include/parseargs.sh | 3 - .../util/portscanner/GridJmxPortFinder.java | 181 --------------------- .../internal/util/portscanner/package-info.java | 23 --- .../ignite/startup/cmdline/CommandLineStartup.java | 3 - .../startup/cmdline/CommandLineTransformer.java | 9 - .../GridCommandLineTransformerSelfTest.java | 8 +- 12 files changed, 14 insertions(+), 350 deletions(-) diff --git a/bin/control.bat b/bin/control.bat index 8b09649..e89240e 100644 --- a/bin/control.bat +++ b/bin/control.bat @@ -129,40 +129,6 @@ set RESTART_SUCCESS_FILE="%IGNITE_HOME%\work\ignite_success_%RANDOM_NUMBER%" set RESTART_SUCCESS_OPT=-DIGNITE_SUCCESS_FILE=%RESTART_SUCCESS_FILE% :: -:: Find available port for JMX -:: -:: You can specify IGNITE_JMX_PORT environment variable for overriding automatically found JMX port -:: -:: This is executed if -nojmx is not specified -:: -if not "%NO_JMX%" == "1" ( - for /F "tokens=*" %%A in ('""!JAVA_HOME!\bin\java" -cp %CP% org.apache.ignite.internal.util.portscanner.GridJmxPortFinder"') do ( - set JMX_PORT=%%A - ) -) - -:: -:: This variable defines necessary parameters for JMX -:: monitoring and management. -:: -:: This enables remote unsecure access to JConsole or VisualVM. -:: -:: ADD YOUR ADDITIONAL PARAMETERS/OPTIONS HERE -:: -if "%JMX_PORT%" == "" ( - echo %0, WARN: Failed to resolve JMX host. JMX will be disabled. - set JMX_MON= -) else ( - if "%JMX_PORT%" == "IGNITE_JMX_PORT_IS_BUSY" ( - echo %0, WARN: Provided IGNITE_JMX_PORT is busy. JMX will be disabled. - set JMX_MON= - ) else ( - set JMX_MON=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=%JMX_PORT% ^ - -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false - ) - ) - -:: :: JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details. :: :: ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE @@ -260,11 +226,11 @@ if defined JVM_OPTS ( ) if "%INTERACTIVE%" == "1" ( - "%JAVA_HOME%\bin\java.exe" %CONTROL_JVM_OPTS% %QUIET% %RESTART_SUCCESS_OPT% %JMX_MON% ^ + "%JAVA_HOME%\bin\java.exe" %CONTROL_JVM_OPTS% %QUIET% %RESTART_SUCCESS_OPT% ^ -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="%IGNITE_HOME%" -DIGNITE_PROG_NAME="%PROG_NAME%" %JVM_XOPTS% ^ -cp "%CP%" %MAIN_CLASS% %* ) else ( - "%JAVA_HOME%\bin\java.exe" %CONTROL_JVM_OPTS% %QUIET% %RESTART_SUCCESS_OPT% %JMX_MON% ^ + "%JAVA_HOME%\bin\java.exe" %CONTROL_JVM_OPTS% %QUIET% %RESTART_SUCCESS_OPT% ^ -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="%IGNITE_HOME%" -DIGNITE_PROG_NAME="%PROG_NAME%" %JVM_XOPTS% ^ -cp "%CP%" %MAIN_CLASS% %* ) diff --git a/bin/control.sh b/bin/control.sh index e3714de..d2be94e 100755 --- a/bin/control.sh +++ b/bin/control.sh @@ -67,17 +67,6 @@ CP="${IGNITE_LIBS}:${IGNITE_HOME}/libs/optional/ignite-zookeeper/*" RANDOM_NUMBER=$("$JAVA" -cp "${CP}" org.apache.ignite.startup.cmdline.CommandLineRandomNumberGenerator) -# -# Find available port for JMX -# -# You can specify IGNITE_JMX_PORT environment variable for overriding automatically found JMX port -# -# This is executed when -nojmx is not specified -# -if [ "${NOJMXI:-}" == "0" ] ; then - findAvailableJmxPort -fi - # Mac OS specific support to display correct name in the dock. osname=`uname` @@ -184,12 +173,12 @@ fi case $osname in Darwin*) - "$JAVA" ${CONTROL_JVM_OPTS} ${QUIET:-} "${DOCK_OPTS}" ${JMX_MON:-} \ + "$JAVA" ${CONTROL_JVM_OPTS} ${QUIET:-} "${DOCK_OPTS}" \ -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \ -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS:-} -cp "${CP}" ${MAIN_CLASS} $@ ;; *) - "$JAVA" ${CONTROL_JVM_OPTS} ${QUIET:-} ${JMX_MON:-} \ + "$JAVA" ${CONTROL_JVM_OPTS} ${QUIET:-} \ -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \ -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS:-} -cp "${CP}" ${MAIN_CLASS} $@ ;; diff --git a/bin/ignite.bat b/bin/ignite.bat index 9c0f0ca..331860a 100644 --- a/bin/ignite.bat +++ b/bin/ignite.bat @@ -138,41 +138,6 @@ set RESTART_SUCCESS_FILE="%IGNITE_HOME%\work\ignite_success_%RANDOM_NUMBER%" set RESTART_SUCCESS_OPT=-DIGNITE_SUCCESS_FILE=%RESTART_SUCCESS_FILE% :: -:: Find available port for JMX -:: -:: You can specify IGNITE_JMX_PORT environment variable for overriding automatically found JMX port -:: -:: This is executed if -nojmx is not specified -:: -if not "%NO_JMX%" == "1" ( - set JMX_PORT="!JAVA_HOME!\bin\java.exe" -cp "%CP%" org.apache.ignite.internal.util.portscanner.GridJmxPortFinder - for /f "usebackq tokens=*" %%A in (`"!JMX_PORT!"`) do ( - set JMX_PORT=%%A - ) -) - -:: -:: This variable defines necessary parameters for JMX -:: monitoring and management. -:: -:: This enables remote unsecure access to JConsole or VisualVM. -:: -:: ADD YOUR ADDITIONAL PARAMETERS/OPTIONS HERE -:: -if "%JMX_PORT%" == "" ( - echo %0, WARN: Failed to resolve JMX host. JMX will be disabled. - set JMX_MON= -) else ( - if "%JMX_PORT%" == "IGNITE_JMX_PORT_IS_BUSY" ( - echo %0, WARN: Provided IGNITE_JMX_PORT is busy. JMX will be disabled. - set JMX_MON= - ) else ( - set JMX_MON=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=%JMX_PORT% ^ - -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false - ) -) - -:: :: JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details. :: :: ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE @@ -265,11 +230,11 @@ if %MAJOR_JAVA_VER% GEQ 11 ( ) if "%INTERACTIVE%" == "1" ( - "%JAVA_HOME%\bin\java.exe" %JVM_OPTS% %QUIET% %RESTART_SUCCESS_OPT% %JMX_MON% ^ + "%JAVA_HOME%\bin\java.exe" %JVM_OPTS% %QUIET% %RESTART_SUCCESS_OPT% ^ -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="%IGNITE_HOME%" -DIGNITE_PROG_NAME="%PROG_NAME%" %JVM_XOPTS% ^ -cp "%CP%" %MAIN_CLASS% ) else ( - "%JAVA_HOME%\bin\java.exe" %JVM_OPTS% %QUIET% %RESTART_SUCCESS_OPT% %JMX_MON% ^ + "%JAVA_HOME%\bin\java.exe" %JVM_OPTS% %QUIET% %RESTART_SUCCESS_OPT% ^ -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="%IGNITE_HOME%" -DIGNITE_PROG_NAME="%PROG_NAME%" %JVM_XOPTS% ^ -cp "%CP%" %MAIN_CLASS% "%CONFIG%" ) diff --git a/bin/ignite.sh b/bin/ignite.sh index baec5c2..41fc0cb 100755 --- a/bin/ignite.sh +++ b/bin/ignite.sh @@ -76,17 +76,6 @@ RANDOM_NUMBER=$("$JAVA" -cp "${CP}" org.apache.ignite.startup.cmdline.CommandLin RESTART_SUCCESS_FILE="${IGNITE_HOME}/work/ignite_success_${RANDOM_NUMBER}" RESTART_SUCCESS_OPT="-DIGNITE_SUCCESS_FILE=${RESTART_SUCCESS_FILE}" -# -# Find available port for JMX -# -# You can specify IGNITE_JMX_PORT environment variable for overriding automatically found JMX port -# -# This is executed when -nojmx is not specified -# -if [ "${NOJMX}" == "0" ] ; then - findAvailableJmxPort -fi - # Mac OS specific support to display correct name in the dock. osname=`uname` @@ -185,12 +174,12 @@ do if [ "${INTERACTIVE}" == "1" ] ; then case $osname in Darwin*) - "$JAVA" ${JVM_OPTS} ${QUIET} "${DOCK_OPTS}" "${RESTART_SUCCESS_OPT}" ${JMX_MON:-} \ + "$JAVA" ${JVM_OPTS} ${QUIET} "${DOCK_OPTS}" "${RESTART_SUCCESS_OPT}" \ -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \ -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS} -cp "${CP}" ${MAIN_CLASS} && ERRORCODE="$?" || ERRORCODE="$?" ;; *) - "$JAVA" ${JVM_OPTS} ${QUIET} "${RESTART_SUCCESS_OPT}" ${JMX_MON:-} \ + "$JAVA" ${JVM_OPTS} ${QUIET} "${RESTART_SUCCESS_OPT}" \ -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \ -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS} -cp "${CP}" ${MAIN_CLASS} && ERRORCODE="$?" || ERRORCODE="$?" ;; @@ -198,12 +187,12 @@ do else case $osname in Darwin*) - "$JAVA" ${JVM_OPTS} ${QUIET} "${DOCK_OPTS}" "${RESTART_SUCCESS_OPT}" ${JMX_MON:-} \ + "$JAVA" ${JVM_OPTS} ${QUIET} "${DOCK_OPTS}" "${RESTART_SUCCESS_OPT}" \ -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \ -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS} -cp "${CP}" ${MAIN_CLASS} "${CONFIG}" && ERRORCODE="$?" || ERRORCODE="$?" ;; *) - "$JAVA" ${JVM_OPTS} ${QUIET} "${RESTART_SUCCESS_OPT}" ${JMX_MON:-} \ + "$JAVA" ${JVM_OPTS} ${QUIET} "${RESTART_SUCCESS_OPT}" \ -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \ -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS} -cp "${CP}" ${MAIN_CLASS} "${CONFIG}" && ERRORCODE="$?" || ERRORCODE="$?" ;; diff --git a/bin/include/functions.sh b/bin/include/functions.sh index 9e6e65c..f3cef38 100755 --- a/bin/include/functions.sh +++ b/bin/include/functions.sh @@ -125,31 +125,6 @@ setIgniteHome() { } # -# Finds available port for JMX. -# The function exports JMX_MON variable with Java JMX options. -# -findAvailableJmxPort() { - JMX_PORT=`"$JAVA" -cp "${IGNITE_LIBS}" org.apache.ignite.internal.util.portscanner.GridJmxPortFinder` - - # - # This variable defines necessary parameters for JMX - # monitoring and management. - # - # This enables remote unsecure access to JConsole or VisualVM. - # - # ADD YOUR ADDITIONAL PARAMETERS/OPTIONS HERE - # - if [ -n "$JMX_PORT" ]; then - JMX_MON="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=${JMX_PORT} \ - -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false" - else - # If JMX port wasn't found do not initialize JMX. - echo "$0, WARN: Failed to resolve JMX host (JMX will be disabled): $HOSTNAME" - JMX_MON="" - fi -} - -# # Gets correct Java class path separator symbol for the given platform. # The function exports SEP variable with class path separator symbol. # diff --git a/bin/include/parseargs.bat b/bin/include/parseargs.bat index a39f9de..b17fba1 100644 --- a/bin/include/parseargs.bat +++ b/bin/include/parseargs.bat @@ -24,7 +24,6 @@ :: QUIET :: NO_PAUSE :: JVM_XOPTS -:: NOJMX :: :: Script setups reasonable defaults (see below) for omitted arguments. :: diff --git a/bin/include/parseargs.sh b/bin/include/parseargs.sh index b4493a7..e5b7f5d 100755 --- a/bin/include/parseargs.sh +++ b/bin/include/parseargs.sh @@ -31,7 +31,6 @@ fi # INTERACTIVE # QUIET # JVM_XOPTS -# NOJMX # # Script setups reasonable defaults (see below) for omitted arguments. # @@ -45,7 +44,6 @@ fi CONFIG=${DEFAULT_CONFIG:-} INTERACTIVE="0" -NOJMX="0" QUIET="-DIGNITE_QUIET=true" JVM_XOPTS="" @@ -53,7 +51,6 @@ while [ $# -gt 0 ] do case "$1" in -i) INTERACTIVE="1";; - -nojmx) NOJMX="1";; -v) QUIET="-DIGNITE_QUIET=false";; -J*) JVM_XOPTS="$JVM_XOPTS ${1:2}";; *) CONFIG="$1";; diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/portscanner/GridJmxPortFinder.java b/modules/core/src/main/java/org/apache/ignite/internal/util/portscanner/GridJmxPortFinder.java deleted file mode 100644 index 8365a6f..0000000 --- a/modules/core/src/main/java/org/apache/ignite/internal/util/portscanner/GridJmxPortFinder.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.internal.util.portscanner; - -import java.io.File; -import java.io.IOException; -import java.io.RandomAccessFile; -import java.net.InetAddress; -import java.net.ServerSocket; -import java.net.UnknownHostException; -import java.nio.channels.FileLock; -import org.apache.ignite.IgniteSystemProperties; -import org.apache.ignite.SystemProperty; - -/** - * Ignite port scanner. - */ -public class GridJmxPortFinder { - /** Environment variable for overriding JMX port. */ - @SystemProperty(value = "JMX port", type = Integer.class) - public static final String IGNITE_JMX_PORT = "IGNITE_JMX_PORT"; - - /** Minimum port number. */ - private static final int MIN_PORT = 49112; - - /** Maximum port number. */ - private static final int MAX_PORT = 65535; - - /** - * Private constructor. - */ - private GridJmxPortFinder() { - // No-op. - } - - /** - * Makes a search of available port. Start port is taken from temp file, it is - * then replaced with newly found port. - * - * @param args Program arguments. - */ - public static void main(String[] args) { - try { - InetAddress.getLocalHost(); - } - catch (UnknownHostException ignored) { - // If the above call fails than JMX wouldn't start. - // Do not return anything to signal inability to run JMX. - return; - } - - int jmxPort = IgniteSystemProperties.getInteger(IGNITE_JMX_PORT, -1); - - if (jmxPort != -1) { - System.out.println(jmxPort); - - return; - } - - RandomAccessFile ra = null; - FileLock lock = null; - - try { - File file = new File(System.getProperty("java.io.tmpdir"), "ignite.lastport.tmp"); - - file.setReadable(true, false); - file.setWritable(true, false); - - ra = new RandomAccessFile(file, "rw"); - - lock = ra.getChannel().lock(); - - ra.seek(0); - - String startPortStr = ra.readLine(); - - int startPort = MIN_PORT; - - if (startPortStr != null && !startPortStr.isEmpty()) { - try { - startPort = Integer.valueOf(startPortStr) + 1; - - if (startPort < MIN_PORT || startPort > MAX_PORT) - startPort = MIN_PORT; - } - catch (NumberFormatException ignored) { - // Ignore, just use default lower bound port. - } - } - - int port = findPort(startPort); - - ra.setLength(0); - - ra.writeBytes(String.valueOf(port)); - - // Ack the port for others to read... - System.out.println(port); - } - catch (IOException ignored) { - // Do not return anything to signal inability to run JMX. - } - finally { - if (lock != null) - try { - lock.release(); - } - catch (IOException ignored) { - // No-op. - } - - if (ra != null) - try { - ra.close(); - } - catch (IOException ignored) { - // No-op. - } - } - } - - /** - * Finds first available port beginning from start port up to {@link GridJmxPortFinder#MAX_PORT}. - * - * @param startPort Start Port number. - * @return Available port number, or 0 if no available port found. - */ - private static int findPort(int startPort) { - for (int port = startPort; port <= MAX_PORT; port++) { - if (isAvailable(port)) - return port; - } - - return 0; - } - - /** - * Checks whether port is available. - * - * @param port Port number. - * @return {@code true} if port is available. - */ - private static boolean isAvailable(int port) { - ServerSocket sock = null; - - try { - sock = new ServerSocket(port); - - return true; - } - catch (IOException ignored) { - return false; - } - finally { - if (sock != null) { - try { - sock.close(); - } - catch (IOException ignored) { - // No-op - // Could we leave it unavailable here? Possible "return false;". - } - } - } - } -} diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/portscanner/package-info.java b/modules/core/src/main/java/org/apache/ignite/internal/util/portscanner/package-info.java deleted file mode 100644 index a815baa..0000000 --- a/modules/core/src/main/java/org/apache/ignite/internal/util/portscanner/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * <!-- Package description. --> - * Contains utility port scanner. - */ - -package org.apache.ignite.internal.util.portscanner; diff --git a/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineStartup.java b/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineStartup.java index 9c5c385..c12365b 100644 --- a/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineStartup.java +++ b/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineStartup.java @@ -53,7 +53,6 @@ import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinu import org.apache.ignite.internal.util.GridConfigurationFinder; import org.apache.ignite.internal.util.OffheapReadWriteLock; import org.apache.ignite.internal.util.lang.GridTuple3; -import org.apache.ignite.internal.util.portscanner.GridJmxPortFinder; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.internal.util.typedef.X; @@ -96,7 +95,6 @@ public final class CommandLineStartup { GridCacheMapEntry.class, LocalDeploymentSpi.class, GridCacheDatabaseSharedManager.class, - GridJmxPortFinder.class, PartitionsEvictManager.class, PagesList.class, PagesList.PagesCache.class, @@ -234,7 +232,6 @@ public final class CommandLineStartup { " ?, /help, -help, - show this message.", " -v - verbose mode (quiet by default).", " -np - no pause on exit (pause by default)", - " -nojmx - disable JMX monitoring (enabled by default)", " " + PRINT_PROPS_COMMAND + " - prints Ignite system properties info."); if (ignite) { diff --git a/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineTransformer.java b/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineTransformer.java index e449bfa..550253b 100644 --- a/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineTransformer.java +++ b/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineTransformer.java @@ -57,9 +57,6 @@ public class CommandLineTransformer { /** No pause mode. */ private boolean noPause; - /** No JMX mode. */ - private boolean noJMX; - /** Supported parameter, parsed manually. */ private String jvmOptions = ""; @@ -137,11 +134,6 @@ public class CommandLineTransformer { break; - case "-nojmx": - noJMX = true; - - break; - default: argsList.add(arg); } @@ -162,7 +154,6 @@ public class CommandLineTransformer { addArgWithValue(sb, "INTERACTIVE", formatBooleanValue(interactive)); addArgWithValue(sb, "QUIET", "-DIGNITE_QUIET=" + !verbose); addArgWithValue(sb, "NO_PAUSE", formatBooleanValue(noPause)); - addArgWithValue(sb, "NO_JMX", formatBooleanValue(noJMX)); parseJvmOptionsAndSpringConfig(args); diff --git a/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineTransformerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineTransformerSelfTest.java index d5f6725..09e6979 100644 --- a/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineTransformerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/startup/cmdline/GridCommandLineTransformerSelfTest.java @@ -33,7 +33,7 @@ public class GridCommandLineTransformerSelfTest extends GridCommonAbstractTest { public void testTransformIfNoArguments() throws Exception { assertEquals( "\"INTERACTIVE=0\" \"QUIET=-DIGNITE_QUIET=true\" \"NO_PAUSE=0\" " + - "\"NO_JMX=0\" \"JVM_XOPTS=-Dfile.encoding=UTF-8\" \"CONFIG=\"", + "\"JVM_XOPTS=-Dfile.encoding=UTF-8\" \"CONFIG=\"", CommandLineTransformer.transform()); } @@ -107,7 +107,7 @@ public class GridCommandLineTransformerSelfTest extends GridCommonAbstractTest { @Test public void testTransformIfOnlyPathToConfigSpecified() throws Exception { assertEquals( - "\"INTERACTIVE=0\" \"QUIET=-DIGNITE_QUIET=true\" \"NO_PAUSE=0\" \"NO_JMX=0\" " + + "\"INTERACTIVE=0\" \"QUIET=-DIGNITE_QUIET=true\" \"NO_PAUSE=0\" " + "\"JVM_XOPTS=-Dfile.encoding=UTF-8\" \"CONFIG=c:\\qw.xml\"", CommandLineTransformer.transform("c:\\qw.xml")); } @@ -118,10 +118,10 @@ public class GridCommandLineTransformerSelfTest extends GridCommonAbstractTest { @Test public void testTransformIfAllSupportedArguments() throws Exception { assertEquals( - "\"INTERACTIVE=1\" \"QUIET=-DIGNITE_QUIET=false\" \"NO_PAUSE=1\" \"NO_JMX=1\" " + + "\"INTERACTIVE=1\" \"QUIET=-DIGNITE_QUIET=false\" \"NO_PAUSE=1\" " + "\"JVM_XOPTS=-Xmx1g -Xms1m -Dfile.encoding=UTF-8\" " + "\"CONFIG=\"c:\\path to\\русский каталог\"\"", - CommandLineTransformer.transform("-i", "-np", "-v", "-J-Xmx1g", "-J-Xms1m", "-nojmx", + CommandLineTransformer.transform("-i", "-np", "-v", "-J-Xmx1g", "-J-Xms1m", "\"c:\\path to\\русский каталог\"")); } }