ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [41/50] [abbrv] ignite git commit: IGNITE-3446 Visor CMD: improve usability for batch mode.
Date Tue, 06 Sep 2016 14:40:03 GMT
IGNITE-3446 Visor CMD: improve usability for batch mode.


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

Branch: refs/heads/ignite-1.5.31-1
Commit: 71ef6527f1b90cf795072174378d9c401714df96
Parents: aedfde6
Author: Andrey Novikov <anovikov@apache.org>
Authored: Fri Jul 22 18:03:50 2016 +0700
Committer: Andrey Novikov <anovikov@apache.org>
Committed: Fri Jul 22 18:03:50 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/71ef6527/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