ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [02/28] ignite git commit: IGNITE-3446 Visor CMD: improve usability for batch mode. (cherry picked from commit 71ef652)
Date Wed, 27 Jul 2016 10:57:33 GMT
IGNITE-3446 Visor CMD: improve usability for batch mode.
(cherry picked from commit 71ef652)


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

Branch: refs/heads/ignite-3443
Commit: 3aaef96a5d2754613c8f7d24ff3045c258fad7d3
Parents: 7fb03c7
Author: Andrey Novikov <anovikov@gridgain.com>
Authored: Fri Jul 22 18:03:50 2016 +0700
Committer: Andrey Novikov <anovikov@apache.org>
Committed: Mon Jul 25 08:02:44 2016 +0700

----------------------------------------------------------------------
 .../ignite/visor/commands/cache/VisorCacheStopCommand.scala     | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/3aaef96a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheStopCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheStopCommand.scala
b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheStopCommand.scala
index 1b55505..22fb89d 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheStopCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheStopCommand.scala
@@ -19,7 +19,6 @@ package org.apache.ignite.visor.commands.cache
 
 import org.apache.ignite.cluster.{ClusterGroupEmptyException, ClusterNode}
 import org.apache.ignite.visor.visor._
-
 import org.apache.ignite.internal.visor.cache.VisorCacheStopTask
 import org.apache.ignite.internal.visor.util.VisorTaskUtils._
 
@@ -102,7 +101,9 @@ class VisorCacheStopCommand {
                 return
         }
 
-        ask(s"Are you sure you want to stop cache: ${escapeName(cacheName)}? (y/n) [n]: ",
"n") match {
+        val dflt = if (batchMode) "y" else "n"
+
+        ask(s"Are you sure you want to stop cache: ${escapeName(cacheName)}? (y/n) [$dflt]:
", dflt) match {
             case "y" | "Y" =>
                 try {
                     executeRandom(grp, classOf[VisorCacheStopTask], cacheName)


Mime
View raw message