ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: # Ignite command line visor
Date Fri, 12 Dec 2014 06:33:09 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/master 8d2473d63 -> 52f2b4002


# Ignite command line visor


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

Branch: refs/heads/master
Commit: 52f2b4002835ef6098548aa3384dba2eaa48c64b
Parents: 8d2473d
Author: sboikov <sboikov@gridgain.com>
Authored: Fri Dec 12 10:32:12 2014 +0400
Committer: sboikov <sboikov@gridgain.com>
Committed: Fri Dec 12 10:32:12 2014 +0400

----------------------------------------------------------------------
 .../gridgain/visor/commands/VisorConsole.scala  | 48 ++++++++-------
 .../visor/commands/VisorConsoleCommand.scala    |  1 +
 .../visor/commands/VisorTextTable.scala         |  5 +-
 .../visor/commands/ack/VisorAckCommand.scala    | 12 ++--
 .../commands/alert/VisorAlertCommand.scala      | 18 +++---
 .../commands/cache/VisorCacheClearCommand.scala |  4 +-
 .../commands/cache/VisorCacheCommand.scala      | 11 ++--
 .../cache/VisorCacheCompactCommand.scala        |  5 +-
 .../commands/cache/VisorCacheScanCommand.scala  |  5 +-
 .../commands/cache/VisorCacheSwapCommand.scala  |  5 +-
 .../config/VisorConfigurationCommand.scala      | 10 +--
 .../commands/deploy/VisorDeployCommand.scala    | 10 +--
 .../commands/disco/VisorDiscoveryCommand.scala  | 19 +++---
 .../commands/events/VisorEventsCommand.scala    | 12 ++--
 .../visor/commands/gc/VisorGcCommand.scala      |  6 +-
 .../visor/commands/kill/VisorKillCommand.scala  | 14 ++---
 .../visor/commands/node/VisorNodeCommand.scala  | 14 ++---
 .../visor/commands/ping/VisorPingCommand.scala  | 10 ++-
 .../commands/start/VisorStartCommand.scala      | 12 ++--
 .../commands/tasks/VisorTasksCommand.scala      | 10 +--
 .../commands/top/VisorTopologyCommand.scala     | 18 +++---
 .../visor/commands/vvm/VisorVvmCommand.scala    | 65 ++++++++++----------
 .../main/scala/org/gridgain/visor/visor.scala   | 44 ++++++-------
 23 files changed, 180 insertions(+), 178 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52f2b400/modules/visor-console/src/main/scala/org/gridgain/visor/commands/VisorConsole.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/VisorConsole.scala
b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/VisorConsole.scala
index 358fc3a..942b7fb 100644
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/VisorConsole.scala
+++ b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/VisorConsole.scala
@@ -11,37 +11,41 @@
 
 package org.gridgain.visor.commands
 
+import org.gridgain.grid.kernal.GridProductImpl
+import org.gridgain.grid.util.scala.impl
+import org.gridgain.grid.util.{GridUtils => U}
+
+import org.apache.ignite.startup.cmdline.AboutDialog
+
+import javax.swing.ImageIcon
 import java.awt.Image
 import java.io.File
 import java.text.SimpleDateFormat
 import java.util
-import javax.swing.ImageIcon
-import org.apache.ignite.startup.cmdline.AboutDialog
-import org.gridgain.grid.util.{GridUtils => U}
-import org.gridgain.grid.util.scala.impl
+
 import org.gridgain.visor.visor
+
 import scala.tools.jline.console.ConsoleReader
 import scala.tools.jline.console.completer.Completer
 import scala.tools.jline.internal.Configuration
-import org.gridgain.grid.kernal.GridProductImpl
 
 // Built-in commands.
 // Note the importing of implicit conversions.
-import ack.VisorAckCommand
-import alert.VisorAlertCommand
-import org.gridgain.visor.commands.cache.{VisorCacheSwapCommand, VisorCacheClearCommand,
VisorCacheCompactCommand, VisorCacheCommand}
-import config.VisorConfigurationCommand
-import deploy.VisorDeployCommand
-import disco.VisorDiscoveryCommand
-import events.VisorEventsCommand
-import gc.VisorGcCommand
-import kill.VisorKillCommand
-import node.VisorNodeCommand
-import ping.VisorPingCommand
-import start.VisorStartCommand
-import tasks.VisorTasksCommand
-import top.VisorTopologyCommand
-import vvm.VisorVvmCommand
+import org.gridgain.visor.commands.ack.VisorAckCommand
+import org.gridgain.visor.commands.alert.VisorAlertCommand
+import org.gridgain.visor.commands.cache.{VisorCacheClearCommand, VisorCacheCommand, VisorCacheCompactCommand,
VisorCacheSwapCommand}
+import org.gridgain.visor.commands.config.VisorConfigurationCommand
+import org.gridgain.visor.commands.deploy.VisorDeployCommand
+import org.gridgain.visor.commands.disco.VisorDiscoveryCommand
+import org.gridgain.visor.commands.events.VisorEventsCommand
+import org.gridgain.visor.commands.gc.VisorGcCommand
+import org.gridgain.visor.commands.kill.VisorKillCommand
+import org.gridgain.visor.commands.node.VisorNodeCommand
+import org.gridgain.visor.commands.ping.VisorPingCommand
+import org.gridgain.visor.commands.start.VisorStartCommand
+import org.gridgain.visor.commands.tasks.VisorTasksCommand
+import org.gridgain.visor.commands.top.VisorTopologyCommand
+import org.gridgain.visor.commands.vvm.VisorVvmCommand
 
 /**
  * Command line Visor.
@@ -186,11 +190,11 @@ object VisorConsole extends App {
 
             val osxApp = appCls.getDeclaredMethod("getApplication").invoke(null)
 
-            val dockIco = new ImageIcon(urlIcon("ggcube_128x128.png"))
+            val dockIco = new ImageIcon(urlIcon("ggcube_node_128x128.png"))
 
             appCls.getDeclaredMethod("setDockIconImage", classOf[Image]).invoke(osxApp, dockIco.getImage)
 
-            val bannerIconUrl = urlIcon("ggcube_48x48.png")
+            val bannerIconUrl = urlIcon("ggcube_node_48x48.png")
 
             val aboutHndProxy = java.lang.reflect.Proxy.newProxyInstance(
                 appCls.getClassLoader,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52f2b400/modules/visor-console/src/main/scala/org/gridgain/visor/commands/VisorConsoleCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/VisorConsoleCommand.scala
b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/VisorConsoleCommand.scala
index b7c6069..16e9b01 100644
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/VisorConsoleCommand.scala
+++ b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/VisorConsoleCommand.scala
@@ -12,6 +12,7 @@
 package org.gridgain.visor.commands
 
 import org.gridgain.grid.util.scala.impl
+
 import org.gridgain.visor.visor
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52f2b400/modules/visor-console/src/main/scala/org/gridgain/visor/commands/VisorTextTable.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/VisorTextTable.scala
b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/VisorTextTable.scala
index 96a7c86..117a8d5 100644
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/VisorTextTable.scala
+++ b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/VisorTextTable.scala
@@ -12,9 +12,10 @@
 package org.gridgain.visor.commands
 
 import org.gridgain.grid.util.{GridStringBuilder => SB}
-import VisorTextTable._
 
-import scala.collection.{Traversable, IterableLike}
+import org.gridgain.visor.commands.VisorTextTable._
+
+import scala.collection.Traversable
 
 /**
  * ==Overview==

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52f2b400/modules/visor-console/src/main/scala/org/gridgain/visor/commands/ack/VisorAckCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/ack/VisorAckCommand.scala
b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/ack/VisorAckCommand.scala
index e306ee3..4002f5d 100644
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/ack/VisorAckCommand.scala
+++ b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/ack/VisorAckCommand.scala
@@ -11,20 +11,18 @@
 
 package org.gridgain.visor.commands.ack
 
-import org.apache.ignite.cluster.ClusterGroupEmptyException
-import org.apache.ignite._
-import org.gridgain.grid._
 import org.gridgain.grid.kernal.visor.misc.VisorAckTask
 
-import java.util.{HashSet => JavaHashSet}
+import org.apache.ignite.cluster.ClusterGroupEmptyException
 
-import scala.collection.JavaConversions._
-import scala.language.implicitConversions
+import java.util.{HashSet => JavaHashSet}
 
 import org.gridgain.visor._
 import org.gridgain.visor.commands.VisorConsoleCommand
 import org.gridgain.visor.visor._
-import org.gridgain.grid.util.typedef.T2
+
+import scala.collection.JavaConversions._
+import scala.language.implicitConversions
 
 /**
  * ==Overview==

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52f2b400/modules/visor-console/src/main/scala/org/gridgain/visor/commands/alert/VisorAlertCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/alert/VisorAlertCommand.scala
b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/alert/VisorAlertCommand.scala
index f0f2d8c..bab4980 100644
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/alert/VisorAlertCommand.scala
+++ b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/alert/VisorAlertCommand.scala
@@ -11,25 +11,25 @@
 
 package org.gridgain.visor.commands.alert
 
+import org.gridgain.grid.util.lang.{GridFunc => F}
+
+import org.apache.ignite._
 import org.apache.ignite.cluster.ClusterNode
-import org.apache.ignite.events.{IgniteEvent, IgniteDiscoveryEvent, IgniteEventType}
+import org.apache.ignite.events.IgniteEventType._
+import org.apache.ignite.events.{IgniteDiscoveryEvent, IgniteEvent, IgniteEventType}
 import org.apache.ignite.lang.IgnitePredicate
-import org.apache.ignite._
-import org.gridgain.grid._
-import IgniteEventType._
-import org.gridgain.grid.util.lang.{GridFunc => F}
 
 import java.util.UUID
 import java.util.concurrent.atomic._
 
-import scala.collection.immutable._
-import scala.language.implicitConversions
-import scala.util.control.Breaks._
-
 import org.gridgain.visor._
 import org.gridgain.visor.commands.{VisorConsoleCommand, VisorTextTable}
 import org.gridgain.visor.visor._
 
+import scala.collection.immutable._
+import scala.language.implicitConversions
+import scala.util.control.Breaks._
+
 /**
  * ==Overview==
  * Visor 'alert' command implementation.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52f2b400/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheClearCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheClearCommand.scala
b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheClearCommand.scala
index e257707..b6bb75e 100644
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheClearCommand.scala
+++ b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheClearCommand.scala
@@ -10,11 +10,13 @@
  */
 package org.gridgain.visor.commands.cache
 
-import org.apache.ignite.cluster.ClusterNode
 import org.gridgain.grid.kernal.visor.cache.VisorCacheClearTask
 import org.gridgain.grid.kernal.visor.util.VisorTaskUtils._
 
+import org.apache.ignite.cluster.ClusterNode
+
 import java.util.Collections
+
 import org.gridgain.visor.commands.VisorTextTable
 import org.gridgain.visor.visor._
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52f2b400/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheCommand.scala
b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheCommand.scala
index 58cb4c1..1125831 100644
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheCommand.scala
+++ b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheCommand.scala
@@ -11,14 +11,13 @@
 
 package org.gridgain.visor.commands.cache
 
-import org.apache.ignite.cluster.ClusterNode
-import org.apache.ignite.lang.IgniteBiTuple
-import org.apache.ignite._
-import org.gridgain.grid._
-import org.gridgain.grid.kernal.visor.cache.{VisorCacheMetricsCollectorTask, VisorCacheMetrics2,
VisorCacheAggregatedMetrics, VisorCacheConfiguration}
-import org.gridgain.grid.kernal.visor.node.{VisorNodeConfigurationCollectorTask, VisorGridConfiguration}
+import org.gridgain.grid.kernal.visor.cache.{VisorCacheAggregatedMetrics, VisorCacheConfiguration,
VisorCacheMetrics2, VisorCacheMetricsCollectorTask}
+import org.gridgain.grid.kernal.visor.node.{VisorGridConfiguration, VisorNodeConfigurationCollectorTask}
 import org.gridgain.grid.util.typedef._
 
+import org.apache.ignite._
+import org.apache.ignite.cluster.ClusterNode
+import org.apache.ignite.lang.IgniteBiTuple
 import org.jetbrains.annotations._
 
 import java.lang.{Boolean => JavaBoolean}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52f2b400/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheCompactCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheCompactCommand.scala
b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheCompactCommand.scala
index fc92b4a..84c0127 100644
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheCompactCommand.scala
+++ b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheCompactCommand.scala
@@ -11,14 +11,13 @@
 
 package org.gridgain.visor.commands.cache
 
-import org.apache.ignite.cluster.ClusterNode
 import org.gridgain.grid.kernal.visor.cache.VisorCacheCompactTask
 import org.gridgain.grid.kernal.visor.util.VisorTaskUtils._
 
+import org.apache.ignite.cluster.ClusterNode
+
 import java.util.Collections
 
-import org.apache.ignite._
-import org.gridgain.grid._
 import org.gridgain.visor.commands.VisorTextTable
 import org.gridgain.visor.visor._
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52f2b400/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheScanCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheScanCommand.scala
b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheScanCommand.scala
index 6f419ac..3e00b08 100644
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheScanCommand.scala
+++ b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheScanCommand.scala
@@ -11,11 +11,12 @@
 
 package org.gridgain.visor.commands.cache
 
-import org.apache.ignite.cluster.ClusterNode
-import org.apache.ignite.lang.IgniteBiTuple
 import org.gridgain.grid.kernal.visor.query.VisorQueryTask.VisorQueryArg
 import org.gridgain.grid.kernal.visor.query.{VisorQueryNextPageTask, VisorQueryResult, VisorQueryTask}
 
+import org.apache.ignite.cluster.ClusterNode
+import org.apache.ignite.lang.IgniteBiTuple
+
 import org.gridgain.visor.commands._
 import org.gridgain.visor.visor._
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52f2b400/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheSwapCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheSwapCommand.scala
b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheSwapCommand.scala
index 3867a31..659adc8 100644
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheSwapCommand.scala
+++ b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheSwapCommand.scala
@@ -10,14 +10,13 @@
  */
 package org.gridgain.visor.commands.cache
 
-import org.apache.ignite.cluster.ClusterNode
 import org.gridgain.grid.kernal.visor.cache.VisorCacheSwapBackupsTask
 import org.gridgain.grid.kernal.visor.util.VisorTaskUtils._
 
+import org.apache.ignite.cluster.ClusterNode
+
 import java.util.Collections
 
-import org.apache.ignite._
-import org.gridgain.grid._
 import org.gridgain.visor.commands.VisorTextTable
 import org.gridgain.visor.visor._
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52f2b400/modules/visor-console/src/main/scala/org/gridgain/visor/commands/config/VisorConfigurationCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/config/VisorConfigurationCommand.scala
b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/config/VisorConfigurationCommand.scala
index e63c792..08353e7 100644
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/config/VisorConfigurationCommand.scala
+++ b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/config/VisorConfigurationCommand.scala
@@ -11,18 +11,18 @@
 
 package org.gridgain.visor.commands.config
 
+import org.gridgain.grid.kernal.visor.node.VisorNodeConfigurationCollectorTask
+import org.gridgain.grid.util.{GridUtils => U}
+
+import org.apache.ignite._
 import org.apache.ignite.cluster.ClusterNode
 import org.apache.ignite.lang.IgniteBiTuple
-import org.gridgain.grid.kernal.visor.node.VisorNodeConfigurationCollectorTask
 
 import java.lang.System._
 
-import org.apache.ignite._
-import org.gridgain.grid._
-import org.gridgain.grid.util.{GridUtils => U}
 import org.gridgain.visor._
-import org.gridgain.visor.commands.{VisorConsoleCommand, VisorTextTable}
 import org.gridgain.visor.commands.cache.VisorCacheCommand
+import org.gridgain.visor.commands.{VisorConsoleCommand, VisorTextTable}
 import org.gridgain.visor.visor._
 
 import scala.collection.JavaConversions._

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52f2b400/modules/visor-console/src/main/scala/org/gridgain/visor/commands/deploy/VisorDeployCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/deploy/VisorDeployCommand.scala
b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/deploy/VisorDeployCommand.scala
index 2369f6b..2b6076c 100644
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/deploy/VisorDeployCommand.scala
+++ b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/deploy/VisorDeployCommand.scala
@@ -11,14 +11,16 @@
 
 package org.gridgain.visor.commands.deploy
 
+import org.gridgain.grid.util.io.GridFilenameUtils
+import org.gridgain.grid.util.typedef.X
+import org.gridgain.grid.util.{GridUtils => U}
+
+import com.jcraft.jsch._
+
 import java.io._
 import java.net.UnknownHostException
 import java.util.concurrent._
 
-import com.jcraft.jsch._
-import org.gridgain.grid.util.io.GridFilenameUtils
-import org.gridgain.grid.util.typedef.X
-import org.gridgain.grid.util.{GridUtils => U}
 import org.gridgain.visor._
 import org.gridgain.visor.commands.VisorConsoleCommand
 import org.gridgain.visor.visor._

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52f2b400/modules/visor-console/src/main/scala/org/gridgain/visor/commands/disco/VisorDiscoveryCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/disco/VisorDiscoveryCommand.scala
b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/disco/VisorDiscoveryCommand.scala
index a9aa696..e7072f2 100644
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/disco/VisorDiscoveryCommand.scala
+++ b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/disco/VisorDiscoveryCommand.scala
@@ -11,25 +11,24 @@
 
 package org.gridgain.visor.commands.disco
 
-import org.apache.ignite.cluster.ClusterNode
-import org.apache.ignite.events.IgniteEventType
-import org.apache.ignite._
-import org.gridgain.grid._
-import IgniteEventType._
 import org.gridgain.grid.kernal.visor.event.VisorGridDiscoveryEvent
 import org.gridgain.grid.kernal.visor.node.VisorNodeEventsCollectorTask
-import VisorNodeEventsCollectorTask.VisorNodeEventsCollectorTaskArg
-import org.gridgain.grid.util.{GridUtils => U}
+import org.gridgain.grid.kernal.visor.node.VisorNodeEventsCollectorTask.VisorNodeEventsCollectorTaskArg
 import org.gridgain.grid.util.lang.{GridFunc => F}
+import org.gridgain.grid.util.{GridUtils => U}
 
-import scala.collection.JavaConversions._
-import scala.collection.immutable._
-import scala.language.{implicitConversions, reflectiveCalls}
+import org.apache.ignite.cluster.ClusterNode
+import org.apache.ignite.events.IgniteEventType
+import org.apache.ignite.events.IgniteEventType._
 
 import org.gridgain.visor._
 import org.gridgain.visor.commands.{VisorConsoleCommand, VisorTextTable}
 import org.gridgain.visor.visor._
 
+import scala.collection.JavaConversions._
+import scala.collection.immutable._
+import scala.language.{implicitConversions, reflectiveCalls}
+
 /**
  * ==Overview==
  * Visor 'disco' command implementation.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52f2b400/modules/visor-console/src/main/scala/org/gridgain/visor/commands/events/VisorEventsCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/events/VisorEventsCommand.scala
b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/events/VisorEventsCommand.scala
index 3cfe15a..d499492 100644
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/events/VisorEventsCommand.scala
+++ b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/events/VisorEventsCommand.scala
@@ -11,17 +11,17 @@
 
 package org.gridgain.visor.commands.events
 
-import org.apache.ignite.events.IgniteEventType
 import org.gridgain.grid.kernal.visor.event.VisorGridEvent
 import org.gridgain.grid.kernal.visor.node.VisorNodeEventsCollectorTask
+import org.gridgain.grid.kernal.visor.node.VisorNodeEventsCollectorTask.VisorNodeEventsCollectorTaskArg
+import org.gridgain.grid.util.{GridUtils => U}
+
+import org.apache.ignite._
+import org.apache.ignite.events.IgniteEventType
+import org.apache.ignite.events.IgniteEventType._
 
 import java.util.UUID
 
-import org.apache.ignite._
-import org.gridgain.grid._
-import IgniteEventType._
-import VisorNodeEventsCollectorTask.VisorNodeEventsCollectorTaskArg
-import org.gridgain.grid.util.{GridUtils => U}
 import org.gridgain.visor._
 import org.gridgain.visor.commands._
 import org.gridgain.visor.visor._

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52f2b400/modules/visor-console/src/main/scala/org/gridgain/visor/commands/gc/VisorGcCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/gc/VisorGcCommand.scala
b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/gc/VisorGcCommand.scala
index 9e2c1a6..9b29d1f 100644
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/gc/VisorGcCommand.scala
+++ b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/gc/VisorGcCommand.scala
@@ -11,14 +11,14 @@
 
 package org.gridgain.visor.commands.gc
 
-import org.apache.ignite.cluster.{ClusterGroupEmptyException, ClusterNode}
 import org.gridgain.grid.kernal.visor.node.VisorNodeGcTask
 
+import org.apache.ignite._
+import org.apache.ignite.cluster.{ClusterGroupEmptyException, ClusterNode}
+
 import java.lang.{Boolean => JavaBoolean}
 import java.util.{UUID, HashSet => JavaHashSet}
 
-import org.apache.ignite._
-import org.gridgain.grid._
 import org.gridgain.visor._
 import org.gridgain.visor.commands.{VisorConsoleCommand, VisorTextTable}
 import org.gridgain.visor.visor._

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52f2b400/modules/visor-console/src/main/scala/org/gridgain/visor/commands/kill/VisorKillCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/kill/VisorKillCommand.scala
b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/kill/VisorKillCommand.scala
index 58cdbd3..041a3d0 100644
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/kill/VisorKillCommand.scala
+++ b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/kill/VisorKillCommand.scala
@@ -11,21 +11,21 @@
 
 package org.gridgain.visor.commands.kill
 
-import org.apache.ignite.cluster.ClusterNode
-import org.apache.ignite._
-import org.gridgain.grid._
 import org.gridgain.grid.kernal.GridNodeAttributes._
 
-import java.util.{Collections, UUID}
+import org.apache.ignite._
+import org.apache.ignite.cluster.ClusterNode
 
-import scala.collection.JavaConversions._
-import scala.language.{implicitConversions, reflectiveCalls}
-import scala.util.control.Breaks._
+import java.util.{Collections, UUID}
 
 import org.gridgain.visor._
 import org.gridgain.visor.commands.VisorConsoleCommand
 import org.gridgain.visor.visor._
 
+import scala.collection.JavaConversions._
+import scala.language.{implicitConversions, reflectiveCalls}
+import scala.util.control.Breaks._
+
 /**
  * ==Overview==
  * Contains Visor command `kill` implementation.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52f2b400/modules/visor-console/src/main/scala/org/gridgain/visor/commands/node/VisorNodeCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/node/VisorNodeCommand.scala
b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/node/VisorNodeCommand.scala
index 9c2cd3a..ee76264 100644
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/node/VisorNodeCommand.scala
+++ b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/node/VisorNodeCommand.scala
@@ -11,19 +11,19 @@
 
 package org.gridgain.visor.commands.node
 
-import java.util.UUID
-
-import org.apache.ignite.cluster.ClusterNode
-import org.apache.ignite._
-import org.gridgain.grid._
 import org.gridgain.grid.kernal.GridNodeAttributes._
+import org.gridgain.grid.util.lang.{GridFunc => F}
 import org.gridgain.grid.util.typedef.X
 import org.gridgain.grid.util.{GridUtils => U}
-import org.gridgain.grid.util.lang.{GridFunc => F}
+
+import org.apache.ignite.cluster.ClusterNode
+import org.jetbrains.annotations._
+
+import java.util.UUID
+
 import org.gridgain.visor._
 import org.gridgain.visor.commands.{VisorConsoleCommand, VisorTextTable}
 import org.gridgain.visor.visor._
-import org.jetbrains.annotations._
 
 import scala.collection.JavaConversions._
 import scala.language.{implicitConversions, reflectiveCalls}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52f2b400/modules/visor-console/src/main/scala/org/gridgain/visor/commands/ping/VisorPingCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/ping/VisorPingCommand.scala
b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/ping/VisorPingCommand.scala
index 22d4d8a..ceeac4b 100644
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/ping/VisorPingCommand.scala
+++ b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/ping/VisorPingCommand.scala
@@ -12,19 +12,17 @@
 package org.gridgain.visor.commands.ping
 
 import org.apache.ignite.cluster.ClusterNode
-import org.apache.ignite._
-import org.gridgain.grid._
 
 import java.util.concurrent._
 
-import scala.collection.JavaConversions._
-import scala.language.{implicitConversions, reflectiveCalls}
-import scala.util.control.Breaks._
-
 import org.gridgain.visor._
 import org.gridgain.visor.commands.{VisorConsoleCommand, VisorTextTable}
 import org.gridgain.visor.visor._
 
+import scala.collection.JavaConversions._
+import scala.language.{implicitConversions, reflectiveCalls}
+import scala.util.control.Breaks._
+
 /**
  * Ping result container.
  */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52f2b400/modules/visor-console/src/main/scala/org/gridgain/visor/commands/start/VisorStartCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/start/VisorStartCommand.scala
b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/start/VisorStartCommand.scala
index 88adf02..48f406b 100644
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/start/VisorStartCommand.scala
+++ b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/start/VisorStartCommand.scala
@@ -11,21 +11,21 @@
 
 package org.gridgain.visor.commands.start
 
-import org.apache.ignite._
-import org.gridgain.grid._
 import org.gridgain.grid.util.{GridUtils => U}
 
+import org.apache.ignite._
+
 import java.io._
 import java.util.concurrent._
 
-import scala.collection.JavaConversions._
-import scala.language.{implicitConversions, reflectiveCalls}
-import scala.util.control.Breaks._
-
 import org.gridgain.visor._
 import org.gridgain.visor.commands.{VisorConsoleCommand, VisorTextTable}
 import org.gridgain.visor.visor._
 
+import scala.collection.JavaConversions._
+import scala.language.{implicitConversions, reflectiveCalls}
+import scala.util.control.Breaks._
+
 /**
  * Node start attempt result.
  */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52f2b400/modules/visor-console/src/main/scala/org/gridgain/visor/commands/tasks/VisorTasksCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/tasks/VisorTasksCommand.scala
b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/tasks/VisorTasksCommand.scala
index f3c648d..aa2c681 100644
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/tasks/VisorTasksCommand.scala
+++ b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/tasks/VisorTasksCommand.scala
@@ -11,17 +11,17 @@
 
 package org.gridgain.visor.commands.tasks
 
-import org.apache.ignite.events.IgniteEventType
-import org.apache.ignite.lang.IgniteUuid
-import org.apache.ignite._
-import org.gridgain.grid._
-import IgniteEventType._
 import org.gridgain.grid.kernal.visor.event.{VisorGridEvent, VisorGridJobEvent, VisorGridTaskEvent}
 import org.gridgain.grid.kernal.visor.node.VisorNodeEventsCollectorTask
 import org.gridgain.grid.kernal.visor.node.VisorNodeEventsCollectorTask.VisorNodeEventsCollectorTaskArg
 import org.gridgain.grid.util.typedef.X
 import org.gridgain.grid.util.{GridUtils => U}
 
+import org.apache.ignite._
+import org.apache.ignite.events.IgniteEventType
+import org.apache.ignite.events.IgniteEventType._
+import org.apache.ignite.lang.IgniteUuid
+
 import java.util.UUID
 
 import org.gridgain.visor._

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52f2b400/modules/visor-console/src/main/scala/org/gridgain/visor/commands/top/VisorTopologyCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/top/VisorTopologyCommand.scala
b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/top/VisorTopologyCommand.scala
index f37be41..68ec27c 100644
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/top/VisorTopologyCommand.scala
+++ b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/top/VisorTopologyCommand.scala
@@ -11,24 +11,24 @@
 
 package org.gridgain.visor.commands.top
 
-import org.apache.ignite.cluster.ClusterNode
-import org.apache.ignite.lang.IgnitePredicate
-import org.apache.ignite._
-import org.gridgain.grid._
 import org.gridgain.grid.kernal.GridNodeAttributes._
-import org.gridgain.grid.util.{GridUtils => U}
 import org.gridgain.grid.util.typedef._
+import org.gridgain.grid.util.{GridUtils => U}
 
-import java.net.{InetAddress, UnknownHostException}
+import org.apache.ignite._
+import org.apache.ignite.cluster.ClusterNode
+import org.apache.ignite.lang.IgnitePredicate
 
-import scala.collection.JavaConversions._
-import scala.language.{implicitConversions, reflectiveCalls}
-import scala.util.control.Breaks._
+import java.net.{InetAddress, UnknownHostException}
 
 import org.gridgain.visor._
 import org.gridgain.visor.commands.{VisorConsoleCommand, VisorTextTable}
 import org.gridgain.visor.visor._
 
+import scala.collection.JavaConversions._
+import scala.language.{implicitConversions, reflectiveCalls}
+import scala.util.control.Breaks._
+
 /**
  * ==Overview==
  * Contains Visor command `top` implementation.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52f2b400/modules/visor-console/src/main/scala/org/gridgain/visor/commands/vvm/VisorVvmCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/vvm/VisorVvmCommand.scala
b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/vvm/VisorVvmCommand.scala
index d4927bf..6871da3 100644
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/vvm/VisorVvmCommand.scala
+++ b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/vvm/VisorVvmCommand.scala
@@ -11,27 +11,25 @@
 
 package org.gridgain.visor.commands.vvm
 
-import org.apache.ignite.IgniteSystemProperties
-import org.apache.ignite.cluster.ClusterNode
-import org.apache.ignite._
-import org.gridgain.grid._
 import org.gridgain.grid.kernal.GridNodeAttributes._
+import org.gridgain.grid.kernal.visor.util.{VisorTaskUtils => TU}
 import org.gridgain.grid.util.{GridUtils => U}
-import org.gridgain.grid.util.typedef.X
+
+import org.apache.ignite.IgniteSystemProperties
+import org.apache.ignite.cluster.ClusterNode
+import org.jetbrains.annotations.Nullable
 
 import java.io.File
 import java.net._
 
-import scala.collection.JavaConversions._
-import scala.language.{implicitConversions, reflectiveCalls}
-import scala.util.control.Breaks._
-
-import org.jetbrains.annotations.Nullable
-
 import org.gridgain.visor._
 import org.gridgain.visor.commands.VisorConsoleCommand
 import org.gridgain.visor.visor._
 
+import scala.collection.JavaConversions._
+import scala.language.{implicitConversions, reflectiveCalls}
+import scala.util.control.Breaks._
+
 /**
  * ==Overview==
  * Contains Visor command `vvm` implementation.
@@ -190,35 +188,36 @@ class VisorVvmCommand {
             val neighbors = grid.forHost(grid.localNode).nodes()
 
             for (node <- nodes if !neighbors.contains(node)) {
-                var addr: String = null
-
-                breakable {
-                    for (a <- node.addresses if U.reachable(InetAddress.getByName(a),
2000)) {
-                        addr = a
+                val port = node.attribute[java.lang.Integer](ATTR_JMX_PORT)
 
-                        break()
-                    }
-                }
-
-                if (addr == null)
-                    scold("Visor failed to get reachable address for node (skipping): " +
nid8(node))
+                if (port == null)
+                    warn("JMX is not enabled for node (skipping): " + nid8(node))
                 else {
-                    val port = node.attribute[java.lang.Integer](ATTR_JMX_PORT)
-
-                    if (port == null)
-                        warn("JMX is not enabled for node (skipping): " + nid8(node))
-                    else {
-                        // Sequential calls to VisualVM will not start separate processes
-                        // but will add new JMX connection to it.
-                        Runtime.getRuntime.exec(vvmCommandArray(vvmCmd + " --openjmx " +
addr + ":" + port))
-
-                        started = true
+                    val addrs = node.addresses.filter(addr => {
+                        try
+                            !InetAddress.getByName(addr).isLoopbackAddress
+                        catch {
+                            case _: Throwable => false
+                        }
+                    })
+
+                    addrs.find(a => TU.reachableByPing(InetAddress.getByName(a), 2000))
match {
+                        case Some(addr) =>
+                            // Sequential calls to VisualVM will not start separate processes
+                            // but will add new JMX connection to it.
+//                            Runtime.getRuntime.exec(vvmCommandArray(vvmCmd + " --openjmx
" + addr + ":" + port)) TODO GG-9577
+                            Runtime.getRuntime.exec(vvmCmd + " --openjmx " + addr + ":" +
port)
+
+                            started = true
+                        case None =>
+                            scold("Visor failed to get reachable address for node (skipping):
" + nid8(node))
                     }
                 }
             }
 
             if (!started)
-                Runtime.getRuntime.exec(vvmCommandArray(vvmCmd))
+//                Runtime.getRuntime.exec(vvmCommandArray(vvmCmd)) TODO GG-9577
+                Runtime.getRuntime.exec(vvmCmd)
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52f2b400/modules/visor-console/src/main/scala/org/gridgain/visor/visor.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/visor.scala b/modules/visor-console/src/main/scala/org/gridgain/visor/visor.scala
index 04b3456..29e4110 100644
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/visor.scala
+++ b/modules/visor-console/src/main/scala/org/gridgain/visor/visor.scala
@@ -11,15 +11,29 @@
 
 package org.gridgain.visor
 
-import org.apache.ignite.lifecycle.IgniteListener
-import org.apache.ignite.thread.IgniteThreadPoolExecutor
-import org.apache.ignite.{IgniteSystemProperties, IgniteState, Ignition}
-import org.apache.ignite.cluster.{ClusterGroupEmptyException, ClusterGroup, ClusterMetrics,
ClusterNode}
-import org.apache.ignite.configuration.IgniteConfiguration
-import org.apache.ignite.events.{IgniteEvent, IgniteDiscoveryEvent, IgniteEventType}
-import org.apache.ignite.lang.IgnitePredicate
+import org.gridgain.grid._
+import org.gridgain.grid.kernal.GridComponentType._
+import org.gridgain.grid.kernal.GridNodeAttributes._
+import org.gridgain.grid.kernal.processors.spring.GridSpringProcessor
 import org.gridgain.grid.kernal.visor.VisorTaskArgument
 import org.gridgain.grid.kernal.visor.node.VisorNodeEventsCollectorTask
+import org.gridgain.grid.kernal.visor.node.VisorNodeEventsCollectorTask.VisorNodeEventsCollectorTaskArg
+import org.gridgain.grid.kernal.{GridEx, GridProductImpl}
+import org.gridgain.grid.util.lang.{GridFunc => F}
+import org.gridgain.grid.util.typedef._
+import org.gridgain.grid.util.{GridConfigurationFinder, GridUtils => U}
+
+import org.apache.ignite.IgniteSystemProperties._
+import org.apache.ignite.cluster.{ClusterGroup, ClusterGroupEmptyException, ClusterMetrics,
ClusterNode}
+import org.apache.ignite.configuration.IgniteConfiguration
+import org.apache.ignite.events.IgniteEventType._
+import org.apache.ignite.events.{IgniteDiscoveryEvent, IgniteEvent, IgniteEventType}
+import org.apache.ignite.lang.IgnitePredicate
+import org.apache.ignite.lifecycle.IgniteListener
+import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi
+import org.apache.ignite.thread.IgniteThreadPoolExecutor
+import org.apache.ignite.{IgniteState, IgniteSystemProperties, Ignition, _}
+import org.jetbrains.annotations.Nullable
 
 import java.io._
 import java.net._
@@ -27,21 +41,7 @@ import java.text._
 import java.util.concurrent._
 import java.util.{HashSet => JHashSet, _}
 
-import IgniteSystemProperties._
-import IgniteEventType._
-import org.gridgain.grid.kernal.GridComponentType._
-import org.gridgain.grid.kernal.GridNodeAttributes._
-import org.gridgain.grid.kernal.processors.spring.GridSpringProcessor
-import VisorNodeEventsCollectorTask.VisorNodeEventsCollectorTaskArg
-import org.gridgain.grid.kernal.{GridEx, GridProductImpl}
-import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi
-import org.gridgain.grid.util.lang.{GridFunc => F}
-import org.gridgain.grid.util.typedef._
-import org.gridgain.grid.util.{GridConfigurationFinder, GridUtils => U}
-import org.apache.ignite._
-import org.gridgain.grid._
 import org.gridgain.visor.commands.{VisorConsoleCommand, VisorTextTable}
-import org.jetbrains.annotations.Nullable
 
 import scala.collection.JavaConversions._
 import scala.collection.immutable
@@ -625,7 +625,7 @@ object visor extends VisorTag {
                     mem.remove(k)
                 }
                 catch {
-                    case ignored: Throwable => // no-op
+                    case ignored: Throwable => // No-op.
                 }
         })
     }


Mime
View raw message