ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [03/20] incubator-ignite git commit: # ignite-185 Add batch mode for Visor console
Date Tue, 10 Mar 2015 06:41:49 GMT
# ignite-185 Add batch mode for Visor console


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/775d4993
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/775d4993
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/775d4993

Branch: refs/heads/ignite-141-2
Commit: 775d4993e7bbf604ae4cee6ce9264f27468429d9
Parents: 5fbfea0
Author: anovikov <anovikov@gridgain.com>
Authored: Thu Feb 19 17:39:33 2015 +0700
Committer: anovikov <anovikov@gridgain.com>
Committed: Thu Feb 19 17:39:33 2015 +0700

----------------------------------------------------------------------
 bin/ignitevisorcmd.bat                                        | 7 ++++++-
 bin/ignitevisorcmd.sh                                         | 7 +++++--
 .../scala/org/apache/ignite/visor/commands/VisorConsole.scala | 2 +-
 3 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/775d4993/bin/ignitevisorcmd.bat
----------------------------------------------------------------------
diff --git a/bin/ignitevisorcmd.bat b/bin/ignitevisorcmd.bat
index ac4a277..717233b 100644
--- a/bin/ignitevisorcmd.bat
+++ b/bin/ignitevisorcmd.bat
@@ -133,11 +133,16 @@ set ENABLE_ASSERTIONS=1
 if %ENABLE_ASSERTIONS% == 1 set JVM_OPTS_VISOR=%JVM_OPTS_VISOR% -ea
 
 ::
+:: Program args.
+::
+if "%ARGS%" == "" set ARGS=%*
+
+::
 :: Starts Visor console.
 ::
 "%JAVA_HOME%\bin\java.exe" %JVM_OPTS_VISOR% -DIGNITE_PROG_NAME="%PROG_NAME%" ^
 -DIGNITE_DEPLOYMENT_MODE_OVERRIDE=ISOLATED %QUIET% %JVM_XOPTS% -cp "%CP%" ^
- org.apache.ignite.visor.commands.VisorConsole
+ org.apache.ignite.visor.commands.VisorConsole %ARGS%
 
 :error_finish
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/775d4993/bin/ignitevisorcmd.sh
----------------------------------------------------------------------
diff --git a/bin/ignitevisorcmd.sh b/bin/ignitevisorcmd.sh
index 3242531..32f2c40 100755
--- a/bin/ignitevisorcmd.sh
+++ b/bin/ignitevisorcmd.sh
@@ -16,6 +16,9 @@
 # limitations under the License.
 #
 
+# Remember visor tester command line parameters
+ARGS=$@
+
 #
 # Import common functions.
 #
@@ -110,13 +113,13 @@ case $osname in
         "$JAVA" ${JVM_OPTS} ${QUIET} "${DOCK_OPTS}" \
         -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" -DIGNITE_PROG_NAME="$0"
\
         -DIGNITE_DEPLOYMENT_MODE_OVERRIDE=ISOLATED ${JVM_XOPTS} -cp "${CP}" \
-        org.apache.ignite.visor.commands.VisorConsole
+        org.apache.ignite.visor.commands.VisorConsole ${ARGS}
     ;;
     *)
         "$JAVA" ${JVM_OPTS} ${QUIET} -DIGNITE_UPDATE_NOTIFIER=false \
         -DIGNITE_HOME="${IGNITE_HOME}" -DIGNITE_PROG_NAME="$0" -DIGNITE_DEPLOYMENT_MODE_OVERRIDE=ISOLATED
\
         ${JVM_XOPTS} -cp "${CP}" \
-        org.apache.ignite.visor.commands.VisorConsole
+        org.apache.ignite.visor.commands.VisorConsole ${ARGS}
     ;;
 esac
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/775d4993/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
index 9c36904..f9cf931 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
@@ -135,7 +135,7 @@ object VisorConsole extends App {
     })
 
     batchCommand.foreach(commands => {
-        val input = commands.replace(";", "\n")
+        val input = (if (commands.endsWith(";")) commands else commands + ";").replace(";",
"\n")
 
         inputStream = new ByteArrayInputStream(input.getBytes("UTF-8"))
     })


Mime
View raw message