ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [11/50] [abbrv] incubator-ignite git commit: # sprint-1 Fixed import after rename.
Date Thu, 12 Feb 2015 23:23:52 GMT
# sprint-1 Fixed import after rename.


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

Branch: refs/heads/ignite-9655-merge
Commit: 0c988a77aa64d270e907ad8da76525bfd4c28d95
Parents: fb38190
Author: anovikov <anovikov@gridgain.com>
Authored: Thu Feb 12 17:13:02 2015 +0700
Committer: anovikov <anovikov@gridgain.com>
Committed: Thu Feb 12 17:13:02 2015 +0700

----------------------------------------------------------------------
 .../ignite/visor/commands/VisorConsole.scala    | 19 +++++++----------
 .../config/VisorConfigurationCommand.scala      | 11 +++++-----
 .../commands/deploy/VisorDeployCommand.scala    | 11 +++++-----
 .../commands/disco/VisorDiscoveryCommand.scala  | 21 ++++++++-----------
 .../commands/events/VisorEventsCommand.scala    | 15 ++++++-------
 .../visor/commands/node/VisorNodeCommand.scala  | 16 +++++++-------
 .../commands/start/VisorStartCommand.scala      |  9 ++++----
 .../commands/tasks/VisorTasksCommand.scala      | 16 ++++++--------
 .../commands/top/VisorTopologyCommand.scala     | 22 +++++++++-----------
 .../visor/commands/vvm/VisorVvmCommand.scala    | 22 +++++++++-----------
 10 files changed, 71 insertions(+), 91 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0c988a77/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 714b92b..a4b0e53 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
@@ -18,10 +18,8 @@
 package org.apache.ignite.visor.commands
 
 import org.apache.ignite.internal.GridProductImpl
-import org.apache.ignite.internal.util.IgniteUtils
-import org.apache.ignite.internal.util.typedef.internal.U
 import org.apache.ignite.internal.util.scala.impl
-
+import org.apache.ignite.internal.util.{IgniteUtils => U}
 import org.apache.ignite.startup.cmdline.AboutDialog
 
 import javax.swing.ImageIcon
@@ -30,12 +28,6 @@ import java.io.File
 import java.text.SimpleDateFormat
 import java.util
 
-import org.apache.ignite.visor.visor
-
-import scala.tools.jline.console.ConsoleReader
-import scala.tools.jline.console.completer.Completer
-import scala.tools.jline.internal.Configuration
-
 // Built-in commands.
 // Note the importing of implicit conversions.
 import org.apache.ignite.visor.commands.ack.VisorAckCommand
@@ -53,6 +45,11 @@ import org.apache.ignite.visor.commands.start.VisorStartCommand
 import org.apache.ignite.visor.commands.tasks.VisorTasksCommand
 import org.apache.ignite.visor.commands.top.VisorTopologyCommand
 import org.apache.ignite.visor.commands.vvm.VisorVvmCommand
+import org.apache.ignite.visor.visor
+
+import scala.tools.jline.console.ConsoleReader
+import scala.tools.jline.console.completer.Completer
+import scala.tools.jline.internal.Configuration
 
 /**
  * Command line Visor.
@@ -94,7 +91,7 @@ object VisorConsole extends App {
     customizeUI()
 
     // Wrap line symbol for user input.
-    private val wrapLine = if (IgniteUtils.isWindows) "^" else "\\"
+    private val wrapLine = if (U.isWindows) "^" else "\\"
 
     private val emptyArg = "^([a-zA-z!?]+)$".r
     private val varArg = "^([a-zA-z!?]+)\\s+(.+)$".r
@@ -270,7 +267,7 @@ private[commands] class VisorFileNameCompleter extends Completer {
             case emptyStr if emptyStr.trim == "" => ""
             case str =>
                 // replace wrong '/' on windows.
-                val translated = if (IgniteUtils.isWindows) str.replace('/', '\\') else str
+                val translated = if (U.isWindows) str.replace('/', '\\') else str
 
                 // line before cursor.
                 val left = translated.substring(0, cursor)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0c988a77/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala
b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala
index 6684117..463e41d 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala
@@ -19,16 +19,17 @@ package org.apache.ignite.visor.commands.config
 
 import org.apache.ignite._
 import org.apache.ignite.cluster.ClusterNode
-import org.apache.ignite.internal.util.IgniteUtils
+import org.apache.ignite.internal.util.{IgniteUtils => U}
 import org.apache.ignite.internal.visor.node.VisorNodeConfigurationCollectorTask
 import org.apache.ignite.lang.IgniteBiTuple
+
+import java.lang.System._
+
 import org.apache.ignite.visor.VisorTag
 import org.apache.ignite.visor.commands.cache.VisorCacheCommand
 import org.apache.ignite.visor.commands.{VisorConsoleCommand, VisorTextTable}
 import org.apache.ignite.visor.visor._
 
-import java.lang.System._
-
 import scala.collection.JavaConversions._
 import scala.language.implicitConversions
 import scala.reflect.ClassTag
@@ -102,7 +103,7 @@ class VisorConfigurationCommand {
      * @return String.
      */
     private def arr2Str[T: ClassTag](arr: Array[T]): String = {
-        if (arr != null && arr.length > 0) IgniteUtils.compact(arr.mkString(",
")) else DFLT
+        if (arr != null && arr.length > 0) U.compact(arr.mkString(", ")) else
DFLT
     }
 
     /**
@@ -345,7 +346,7 @@ class VisorConfigurationCommand {
 
             val evtsT = VisorTextTable()
 
-            val inclEvtTypes = Option(cfg.includeEventTypes()).fold(DFLT)(et => arr2Str(et.map(IgniteUtils.gridEventName)))
+            val inclEvtTypes = Option(cfg.includeEventTypes()).fold(DFLT)(et => arr2Str(et.map(U.gridEventName)))
 
             evtsT += ("Included event types", inclEvtTypes)
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0c988a77/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/deploy/VisorDeployCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/deploy/VisorDeployCommand.scala
b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/deploy/VisorDeployCommand.scala
index 5d22c2e..3cea592 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/deploy/VisorDeployCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/deploy/VisorDeployCommand.scala
@@ -17,9 +17,9 @@
 
 package org.apache.ignite.visor.commands.deploy
 
-import org.apache.ignite.internal.util.IgniteUtils
 import org.apache.ignite.internal.util.io.GridFilenameUtils
 import org.apache.ignite.internal.util.typedef.X
+import org.apache.ignite.internal.util.{IgniteUtils => U}
 
 import com.jcraft.jsch._
 
@@ -27,10 +27,9 @@ import java.io._
 import java.net.UnknownHostException
 import java.util.concurrent._
 
-import org.apache.ignite.internal.util.typedef.internal.U
-import org.apache.ignite.visor.{VisorTag, visor}
+import org.apache.ignite.visor.VisorTag
 import org.apache.ignite.visor.commands.VisorConsoleCommand
-import visor._
+import org.apache.ignite.visor.visor._
 
 import scala.language.{implicitConversions, reflectiveCalls}
 import scala.util.control.Breaks._
@@ -184,7 +183,7 @@ private case class VisorCopier(
                 ch.connect()
 
                 // Added to skip login message.
-                IgniteUtils.sleep(1000)
+                U.sleep(1000)
 
                 val writer = new PrintStream(ch.getOutputStream, true)
 
@@ -608,5 +607,5 @@ object VisorDeployCommand {
      *
      * @param vs Visor tagging trait.
      */
-    implicit def fromDeploy2Visor(vs: VisorTag) = cmd
+    implicit def fromDeploy2Visor(vs: VisorTag): VisorDeployCommand = cmd
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0c988a77/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/disco/VisorDiscoveryCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/disco/VisorDiscoveryCommand.scala
b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/disco/VisorDiscoveryCommand.scala
index 0b2175c..ee8fc25 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/disco/VisorDiscoveryCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/disco/VisorDiscoveryCommand.scala
@@ -17,20 +17,17 @@
 
 package org.apache.ignite.visor.commands.disco
 
-import org.apache.ignite.internal.util.IgniteUtils
-import org.apache.ignite.internal.util.typedef.internal.U
+import org.apache.ignite.cluster.ClusterNode
+import org.apache.ignite.events.EventType._
+import org.apache.ignite.internal.util.lang.{GridFunc => F}
+import org.apache.ignite.internal.util.{IgniteUtils => U}
 import org.apache.ignite.internal.visor.event.VisorGridDiscoveryEvent
 import org.apache.ignite.internal.visor.node.VisorNodeEventsCollectorTask
 import org.apache.ignite.internal.visor.node.VisorNodeEventsCollectorTask.VisorNodeEventsCollectorTaskArg
-import org.apache.ignite.internal.util.lang.{GridFunc => F}
-
-import org.apache.ignite.cluster.ClusterNode
-import org.apache.ignite.events.EventType
-import org.apache.ignite.events.EventType._
-import org.apache.ignite.visor.{VisorTag, visor}
 
+import org.apache.ignite.visor.VisorTag
 import org.apache.ignite.visor.commands.{VisorConsoleCommand, VisorTextTable}
-import visor._
+import org.apache.ignite.visor.visor._
 
 import scala.collection.JavaConversions._
 import scala.collection.immutable._
@@ -152,7 +149,7 @@ class VisorDiscoveryCommand {
 
                 val cnt =
                     try
-                        cntOpt.map(_.toInt).getOrElse(Int.MaxValue)
+                        cntOpt.fold(Int.MaxValue)(_.toInt)
                     catch {
                         case e: NumberFormatException =>
                             scold("Invalid count: " + cntOpt.get)
@@ -226,7 +223,7 @@ class VisorDiscoveryCommand {
         val nodeStartTime = node.metrics().getStartTime
 
         if (nodeStartTime > System.currentTimeMillis() - tmFrame) {
-            val root = new VisorGridDiscoveryEvent(EVT_NODE_JOINED, null, IgniteUtils.gridEventName(EVT_NODE_JOINED),
+            val root = new VisorGridDiscoveryEvent(EVT_NODE_JOINED, null, U.gridEventName(EVT_NODE_JOINED),
                 node.id(), nodeStartTime, "", "", node.id, node.addresses().head, node.isDaemon)
 
             evts = Seq(root) ++ evts
@@ -302,5 +299,5 @@ object VisorDiscoveryCommand {
      *
      * @param vs Visor tagging trait.
      */
-    implicit def fromDisco2Visor(vs: VisorTag) = cmd
+    implicit def fromDisco2Visor(vs: VisorTag): VisorDiscoveryCommand = cmd
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0c988a77/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/events/VisorEventsCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/events/VisorEventsCommand.scala
b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/events/VisorEventsCommand.scala
index 1100d15..ba3640b 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/events/VisorEventsCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/events/VisorEventsCommand.scala
@@ -17,21 +17,18 @@
 
 package org.apache.ignite.visor.commands.events
 
-import org.apache.ignite.internal.util.IgniteUtils
-import org.apache.ignite.internal.util.typedef.internal.U
+import org.apache.ignite._
+import org.apache.ignite.events.EventType._
+import org.apache.ignite.internal.util.{IgniteUtils => U}
 import org.apache.ignite.internal.visor.event.VisorGridEvent
 import org.apache.ignite.internal.visor.node.VisorNodeEventsCollectorTask
 import org.apache.ignite.internal.visor.node.VisorNodeEventsCollectorTask.VisorNodeEventsCollectorTaskArg
 
-import org.apache.ignite._
-import org.apache.ignite.events.EventType
-import org.apache.ignite.events.EventType._
-
 import java.util.UUID
 
 import org.apache.ignite.visor.VisorTag
 import org.apache.ignite.visor.commands._
-import visor.visor._
+import org.apache.ignite.visor.visor._
 
 import scala.collection.JavaConversions._
 import scala.collection.immutable._
@@ -395,7 +392,7 @@ class VisorEventsCommand {
             all #= ("Timestamp", "Description")
 
             sorted.take(cnt).foreach(evt =>
-                all += (formatDateTime(evt.timestamp()), IgniteUtils.compact(evt.shortDisplay))
+                all += (formatDateTime(evt.timestamp()), U.compact(evt.shortDisplay))
             )
 
             all.render()
@@ -526,5 +523,5 @@ object VisorEventsCommand {
      *
      * @param vs Visor tagging trait.
      */
-    implicit def fromEvts2Visor(vs: VisorTag) = cmd
+    implicit def fromEvts2Visor(vs: VisorTag): VisorEventsCommand = cmd
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0c988a77/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/node/VisorNodeCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/node/VisorNodeCommand.scala
b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/node/VisorNodeCommand.scala
index b74c0f5..9eb855e 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/node/VisorNodeCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/node/VisorNodeCommand.scala
@@ -17,21 +17,19 @@
 
 package org.apache.ignite.visor.commands.node
 
-import org.apache.ignite.internal.IgniteNodeAttributes
-import org.apache.ignite.internal.util.IgniteUtils
-import org.apache.ignite.internal.util.typedef.internal.U
-import IgniteNodeAttributes._
+import org.apache.ignite.cluster.ClusterNode
+import org.apache.ignite.internal.IgniteNodeAttributes._
 import org.apache.ignite.internal.util.lang.{GridFunc => F}
 import org.apache.ignite.internal.util.typedef.X
+import org.apache.ignite.internal.util.{IgniteUtils => U}
 
-import org.apache.ignite.cluster.ClusterNode
-import org.apache.ignite.visor.{VisorTag, visor}
 import org.jetbrains.annotations._
 
 import java.util.UUID
 
+import org.apache.ignite.visor.VisorTag
 import org.apache.ignite.visor.commands.{VisorConsoleCommand, VisorTextTable}
-import visor._
+import org.apache.ignite.visor.visor._
 
 import scala.collection.JavaConversions._
 import scala.language.{implicitConversions, reflectiveCalls}
@@ -175,7 +173,7 @@ class VisorNodeCommand {
 
                         val gridName: String = node.attribute(ATTR_GRID_NAME)
 
-                        val ver = IgniteUtils.productVersion(node)
+                        val ver = U.productVersion(node)
                         val verStr = ver.major() + "." + ver.minor() + "." + ver.maintenance()
+
                             (if (F.isEmpty(ver.stage())) "" else "-" + ver.stage())
 
@@ -338,5 +336,5 @@ object VisorNodeCommand {
      *
      * @param vs Visor tagging trait.
      */
-    implicit def fromNode2Visor(vs: VisorTag) = cmd
+    implicit def fromNode2Visor(vs: VisorTag): VisorNodeCommand = cmd
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0c988a77/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/VisorStartCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/VisorStartCommand.scala
b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/VisorStartCommand.scala
index 83c71ef..e1656d8 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/VisorStartCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/VisorStartCommand.scala
@@ -18,15 +18,14 @@
 package org.apache.ignite.visor.commands.start
 
 import org.apache.ignite._
+import org.apache.ignite.internal.util.{IgniteUtils => U}
 
 import java.io._
 import java.util.concurrent._
 
-import org.apache.ignite.internal.util.IgniteUtils
-import org.apache.ignite.internal.util.typedef.internal.U
 import org.apache.ignite.visor.VisorTag
 import org.apache.ignite.visor.commands.{VisorConsoleCommand, VisorTextTable}
-import visor.visor._
+import org.apache.ignite.visor.visor._
 
 import scala.collection.JavaConversions._
 import scala.language.{implicitConversions, reflectiveCalls}
@@ -311,7 +310,7 @@ class VisorStartCommand {
 
                 errT #= ("Host", "Error")
 
-                res.filter(!_.ok) foreach (r => { errT += (r.host, r.errMsg.replace("\t",
" ").split(IgniteUtils.nl()).toSeq) })
+                res.filter(!_.ok) foreach (r => { errT += (r.host, r.errMsg.replace("\t",
" ").split(U.nl()).toSeq) })
 
                 errT.render()
             }
@@ -425,5 +424,5 @@ object VisorStartCommand {
      *
      * @param vs Visor tagging trait.
      */
-    implicit def fromStart2Visor(vs: VisorTag) = cmd
+    implicit def fromStart2Visor(vs: VisorTag): VisorStartCommand = cmd
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0c988a77/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommand.scala
b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommand.scala
index 2cd532e..bc137ab 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommand.scala
@@ -17,23 +17,20 @@
 
 package org.apache.ignite.visor.commands.tasks
 
-import org.apache.ignite.internal.util.IgniteUtils
-import org.apache.ignite.internal.util.typedef.internal.U
+import org.apache.ignite._
+import org.apache.ignite.events.EventType._
+import org.apache.ignite.internal.util.typedef.X
+import org.apache.ignite.internal.util.{IgniteUtils => U}
 import org.apache.ignite.internal.visor.event.{VisorGridEvent, VisorGridJobEvent, VisorGridTaskEvent}
 import org.apache.ignite.internal.visor.node.VisorNodeEventsCollectorTask
 import org.apache.ignite.internal.visor.node.VisorNodeEventsCollectorTask.VisorNodeEventsCollectorTaskArg
-import org.apache.ignite.internal.util.typedef.X
-
-import org.apache.ignite._
-import org.apache.ignite.events.EventType
-import org.apache.ignite.events.EventType._
 import org.apache.ignite.lang.IgniteUuid
 
 import java.util.UUID
 
 import org.apache.ignite.visor.VisorTag
 import org.apache.ignite.visor.commands.{VisorConsoleCommand, VisorTextTable}
-import visor.visor._
+import org.apache.ignite.visor.visor._
 
 import scala.collection.JavaConversions._
 import scala.language.implicitConversions
@@ -75,8 +72,7 @@ private case class VisorExecution(
     /**
      * ID8 form of task execution ID.
      */
-    lazy val id8: String =
-        IgniteUtils.id8(id)
+    lazy val id8: String = U.id8(id)
 
     /**
      * ID8 of the task execution + its associated variable.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0c988a77/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala
b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala
index afbd932..3684b9a 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala
@@ -17,20 +17,18 @@
 
 package org.apache.ignite.visor.commands.top
 
-import org.apache.ignite.internal.IgniteNodeAttributes
-import org.apache.ignite.internal.util.IgniteUtils
-import IgniteNodeAttributes._
-import org.apache.ignite.internal.util.typedef._
-
 import org.apache.ignite._
 import org.apache.ignite.cluster.ClusterNode
+import org.apache.ignite.internal.IgniteNodeAttributes._
+import org.apache.ignite.internal.util.typedef.X
+import org.apache.ignite.internal.util.{IgniteUtils => U}
 import org.apache.ignite.lang.IgnitePredicate
 
 import java.net.{InetAddress, UnknownHostException}
 
 import org.apache.ignite.visor.VisorTag
 import org.apache.ignite.visor.commands.{VisorConsoleCommand, VisorTextTable}
-import visor.visor._
+import org.apache.ignite.visor.visor._
 
 import scala.collection.JavaConversions._
 import scala.language.{implicitConversions, reflectiveCalls}
@@ -262,7 +260,7 @@ class VisorTopologyCommand {
                     nodeId8Addr(n.id),
                     formatDateTime(m.getStartTime),
                     X.timeSpan2HMS(m.getUpTime),
-                    n.metrics.getTotalCpus,
+                    m.getTotalCpus,
                     safePercent(cpuLoadPct),
                     formatDouble(freeHeapPct) + " %"
                 )
@@ -275,7 +273,7 @@ class VisorTopologyCommand {
             nl()
         }
 
-        val neighborhood = IgniteUtils.neighborhood(nodes)
+        val neighborhood = U.neighborhood(nodes)
 
         val hostsT = VisorTextTable()
 
@@ -336,12 +334,12 @@ class VisorTopologyCommand {
 
         val sumT = VisorTextTable()
 
-        sumT += ("Total hosts", IgniteUtils.neighborhood(ignite.nodes()).size)
-        sumT += ("Total nodes", ignite.nodes().size)
+        sumT += ("Total hosts", U.neighborhood(nodes).size)
+        sumT += ("Total nodes", nodes.size)
         sumT += ("Total CPUs", m.getTotalCpus)
         sumT += ("Avg. CPU load", safePercent(m.getAverageCpuLoad * 100))
         sumT += ("Avg. free heap", formatDouble(freeHeap) + " %")
-        sumT += ("Avg. Up time", X.timeSpan2HMS(m.getUpTime.toLong))
+        sumT += ("Avg. Up time", X.timeSpan2HMS(m.getUpTime))
         sumT += ("Snapshot time", formatDateTime(System.currentTimeMillis))
 
         println("Summary:")
@@ -427,5 +425,5 @@ object VisorTopologyCommand {
      *
      * @param vs Visor tagging trait.
      */
-    implicit def fromTop2Visor(vs: VisorTag) = cmd
+    implicit def fromTop2Visor(vs: VisorTag): VisorTopologyCommand = cmd
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0c988a77/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommand.scala
b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommand.scala
index 1e72769..c2abbac 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommand.scala
@@ -17,22 +17,20 @@
 
 package org.apache.ignite.visor.commands.vvm
 
-import org.apache.ignite.internal.IgniteNodeAttributes
-import org.apache.ignite.internal.util.IgniteUtils
-import org.apache.ignite.internal.util.typedef.internal.U
-import IgniteNodeAttributes._
-import org.apache.ignite.internal.visor.util.{VisorTaskUtils => TU}
-
 import org.apache.ignite.IgniteSystemProperties
 import org.apache.ignite.cluster.ClusterNode
-import org.apache.ignite.visor.{VisorTag, visor}
+import org.apache.ignite.internal.IgniteNodeAttributes._
+import org.apache.ignite.internal.util.{IgniteUtils => U}
+import org.apache.ignite.internal.visor.util.{VisorTaskUtils => TU}
+
 import org.jetbrains.annotations.Nullable
 
 import java.io.File
 import java.net._
 
+import org.apache.ignite.visor.VisorTag
 import org.apache.ignite.visor.commands.VisorConsoleCommand
-import visor._
+import org.apache.ignite.visor.visor._
 
 import scala.collection.JavaConversions._
 import scala.language.{implicitConversions, reflectiveCalls}
@@ -120,7 +118,7 @@ class VisorVvmCommand {
 
             var vvmCmd: String = null
 
-            val ext = if (IgniteUtils.isWindows) ".exe" else ""
+            val ext = if (U.isWindows) ".exe" else ""
 
             val fs = File.separator
 
@@ -195,7 +193,7 @@ class VisorVvmCommand {
 
             val neighbors = ignite.forHost(ignite.localNode).nodes()
 
-            if (IgniteUtils.isWindows)
+            if (U.isWindows)
                 vvmCmd = "cmd /c \"%s\"".format(vvmCmd)
 
             for (node <- nodes if !neighbors.contains(node)) {
@@ -236,7 +234,7 @@ class VisorVvmCommand {
      * @param vvmCmd VisualVM command.
      */
     private def vvmCommandArray(vvmCmd: String): Array[String] = {
-        if (IgniteUtils.isWindows) Array("cmd", "/c", vvmCmd) else Array(vvmCmd)
+        if (U.isWindows) Array("cmd", "/c", vvmCmd) else Array(vvmCmd)
     }
 
     /**
@@ -304,5 +302,5 @@ object VisorVvmCommand {
      *
      * @param vs Visor tagging trait.
      */
-    implicit def fromVvm2Visor(vs: VisorTag) = cmd
+    implicit def fromVvm2Visor(vs: VisorTag): VisorVvmCommand = cmd
 }


Mime
View raw message