ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [34/50] [abbrv] incubator-ignite git commit: # ignite-63
Date Fri, 23 Jan 2015 09:02:42 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e1c3c8ce/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
deleted file mode 100644
index 7e46aa1..0000000
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheCommand.scala
+++ /dev/null
@@ -1,893 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gridgain.visor.commands.cache
-
-import org.apache.ignite.internal.visor.cache._
-import org.apache.ignite.internal.visor.node.{VisorGridConfiguration, VisorNodeConfigurationCollectorTask}
-import org.apache.ignite.internal.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}
-import java.util.UUID
-
-import org.gridgain.visor._
-import org.gridgain.visor.commands.cache.VisorCacheCommand._
-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==
- * Visor 'cache' command implementation.
- *
- * ==Help==
- * {{{
- * +-----------------------------------------------------------------------------------------+
- * | cache          | Prints statistics about caches from specified node on the entire grid. |
- * |                | Output sorting can be specified in arguments.                          |
- * |                |                                                                        |
- * |                | Output abbreviations:                                                  |
- * |                |     #   Number of nodes.                                               |
- * |                |     H/h Number of cache hits.                                          |
- * |                |     M/m Number of cache misses.                                        |
- * |                |     R/r Number of cache reads.                                         |
- * |                |     W/w Number of cache writes.                                        |
- * +-----------------------------------------------------------------------------------------+
- * | cache -compact | Compacts all entries in cache on all nodes.                            |
- * +-----------------------------------------------------------------------------------------+
- * | cache -clear   | Clears all entries from cache on all nodes.                            |
- * +-----------------------------------------------------------------------------------------+
- * | cache -scan    | List all entries in cache with specified name.                         |
- * +-----------------------------------------------------------------------------------------+
- * }}}
- *
- * ====Specification====
- * {{{
- *     cache
- *     cache -i
- *     cache {-c=<cache-name>} {-id=<node-id>|id8=<node-id8>} {-s=lr|lw|hi|mi|re|wr} {-a} {-r}
- *     cache -clear {-c=<cache-name>}
- *     cache -compact {-c=<cache-name>}
- *     cache -scan -c=<cache-name> {-id=<node-id>|id8=<node-id8>} {-p=<page size>}
- *     cache -swap {-c=<cache-name>} {-id=<node-id>|id8=<node-id8>}
- * }}}
- *
- * ====Arguments====
- * {{{
- *     -id=<node-id>
- *         Full ID of the node to get cache statistics from.
- *         Either '-id8' or '-id' can be specified.
- *         If neither is specified statistics will be gathered from all nodes.
- *     -id8=<node-id>
- *         ID8 of the node to get cache statistics from.
- *         Either '-id8' or '-id' can be specified.
- *         If neither is specified statistics will be gathered from all nodes.
- *     -c=<cache-name>
- *         Name of the cache.
- *     -s=lr|lw|hi|mi|re|wr|cn
- *         Defines sorting type. Sorted by:
- *            lr Last read.
- *            lw Last write.
- *            hi Hits.
- *            mi Misses.
- *            rd Reads.
- *            wr Writes.
- *         If not specified - default sorting is 'lr'.
- *     -i
- *         Interactive mode.
- *         User can interactively select node for cache statistics.
- *     -r
- *         Defines if sorting should be reversed.
- *         Can be specified only with '-s' argument.
- *     -a
- *         Prints details statistics about each cache.
- *         By default only aggregated summary is printed.
- *     -compact
- *          Compacts entries in cache.
- *     -clear
- *          Clears cache.
- *     -scan
- *          Prints list of all entries from cache.
- *     -swap
- *          Swaps backup entries in cache.
- *     -p=<page size>
- *         Number of object to fetch from cache at once.
- *         Valid range from 1 to 100.
- *         By default page size is 25.
- * }}}
- *
- * ====Examples====
- * {{{
- *     cache
- *         Prints summary statistics about all caches.
- *     cache -id8=12345678 -s=hi -r
- *         Prints summary statistics about caches from node with specified id8
- *         sorted by number of hits in reverse order.
- *     cache -i
- *         Prints cache statistics for interactively selected node.
- *     cache -s=hi -r -a
- *         Prints detailed statistics about all caches sorted by number of hits in reverse order.
- *     cache -compact
- *         Compacts entries in interactively selected cache.
- *     cache -compact -c=cache
- *         Compacts entries in cache with name 'cache'.
- *     cache -clear
- *         Clears interactively selected cache.
- *     cache -clear -c=cache
- *         Clears cache with name 'cache'.
- *     cache -scan
- *         Prints list entries from interactively selected cache.
- *     cache -scan -c=cache
- *         Prints list entries from cache with name 'cache' from all nodes with this cache.
- *     cache -scan -c=@c0 -p=50
- *         Prints list entries from cache with name taken from 'c0' memory variable
- *         with page of 50 items from all nodes with this cache.
- *     cache -scan -c=cache -id8=12345678
- *         Prints list entries from cache with name 'cache' and node '12345678' ID8.
- *     cache -swap
- *         Swaps entries in interactively selected cache.
- *     cache -swap -c=cache
- *         Swaps entries in cache with name 'cache'.
- *     cache -swap -c=@c0
- *         Swaps entries in cache with name taken from 'c0' memory variable.
- * }}}
- */
-class VisorCacheCommand {
-    /**
-     * Prints error message and advise.
-     *
-     * @param errMsgs Error messages.
-     */
-    private def scold(errMsgs: Any*) {
-        assert(errMsgs != null)
-
-        warn(errMsgs: _*)
-        warn("Type 'help cache' to see how to use this command.")
-    }
-
-    /**
-     * ===Command===
-     * Prints statistics about caches from nodes that pass mnemonic predicate.
-     * Sorting can be specified in arguments.
-     *
-     * ===Examples===
-     * <ex>cache -id8=12345678 -s=no -r</ex>
-     *     Prints statistics about caches from node with specified id8 sorted by number of nodes in reverse order.
-     * <br>
-     * <ex>cache -s=no -r</ex>
-     *     Prints statistics about all caches sorted by number of nodes in reverse order.
-     * <br>
-     * <ex>cache -compact</ex>
-     *      Compacts entries in interactively selected cache.
-     * <br>
-     * <ex>cache -compact -c=cache</ex>
-     *      Compacts entries in cache with name 'cache'.
-     * <br>
-     * <ex>cache -clear</ex>
-     *      Clears interactively selected cache.
-     * <br>
-     * <ex>cache -clear -c=cache</ex>
-     *      Clears cache with name 'cache'.
-     * <br>
-     * <ex>cache -scan</ex>
-     *     Prints list entries from interactively selected cache.
-     * <br>
-     * <ex>cache -scan -c=cache</ex>
-     *     Prints list entries from cache with name 'cache' from all nodes with this cache.
-     * <br>
-     * <ex>cache -scan -c=@c0 -p=50</ex>
-     *     Prints list entries from cache with name taken from 'c0' memory variable with page of 50 items
-     *     from all nodes with this cache.
-     * <br>
-     * <ex>cache -scan -c=cache -id8=12345678</ex>
-     *     Prints list entries from cache with name 'cache' and node '12345678' ID8.
-     * <br>
-     * <ex>cache -swap</ex>
-     *     Swaps entries in interactively selected cache.
-     * <br>
-     * <ex>cache -swap -c=cache</ex>
-     *     Swaps entries in cache with name 'cache'.
-     * <br>
-     * <ex>cache -swap -c=@c0</ex>
-     *     Swaps entries in cache with name taken from 'c0' memory variable.
-     *
-     * @param args Command arguments.
-     */
-    def cache(args: String) {
-        breakable {
-            if (!isConnected)
-                adviseToConnect()
-            else {
-                var argLst = parseArgs(args)
-
-                if (hasArgFlag("i", argLst)) {
-                    askForNode("Select node from:") match {
-                        case Some(nid) => ask("Detailed statistics (y/n) [n]: ", "n") match {
-                            case "n" | "N" => nl(); cache("-id=" + nid).^^
-                            case "y" | "Y" => nl(); cache("-a -id=" + nid).^^
-                            case x => nl(); warn("Invalid answer: " + x).^^
-                        }
-                        case None => break()
-                    }
-
-                    break()
-                }
-
-                val node = parseNode(argLst) match {
-                    case Left(msg) =>
-                        scold(msg)
-
-                        break()
-
-                    case Right(n) => n
-                }
-
-                val cacheName = argValue("c", argLst) match {
-                    case Some("<default>") | Some(CACHE_DFLT) =>
-                        argLst = argLst.filter(_._1 != "c") ++ Seq("c" -> null)
-
-                        Some(null)
-                    case cn => cn
-                }
-
-                if (Seq("clear", "compact", "swap", "scan").exists(hasArgFlag(_, argLst))) {
-                    if (cacheName.isEmpty)
-                        askForCache("Select cache from:", node) match {
-                            case Some(name) => argLst = argLst ++ Seq("c" -> name)
-                            case None => break()
-                        }
-
-                    if (hasArgFlag("clear", argLst))
-                        VisorCacheClearCommand().clear(argLst, node)
-                    else if (hasArgFlag("compact", argLst))
-                        VisorCacheCompactCommand().compact(argLst, node)
-                    else if (hasArgFlag("swap", argLst))
-                        VisorCacheSwapCommand().swap(argLst, node)
-                    else if (hasArgFlag("scan", argLst))
-                        VisorCacheScanCommand().scan(argLst, node)
-
-                    break()
-                }
-
-                val all = hasArgFlag("a", argLst)
-
-                val sortType = argValue("s", argLst)
-                val reversed = hasArgName("r", argLst)
-
-                if (sortType.isDefined && !isValidSortType(sortType.get))
-                    scold("Invalid '-s' argument in: " + args).^^
-
-                // Get cache stats data from all nodes.
-                val aggrData = cacheData(node, cacheName)
-
-                if (aggrData.isEmpty)
-                    scold("No caches found.").^^
-
-                println("Time of the snapshot: " + formatDateTime(System.currentTimeMillis))
-
-                val sumT = VisorTextTable()
-
-                sumT #= (("Name(@),", "Last Read/Write"), "Nodes", "Entries", "Hits", "Misses", "Reads", "Writes")
-
-                sortAggregatedData(aggrData, sortType.getOrElse("lr"), reversed).foreach(
-                    ad => {
-                        // Add cache host as visor variable.
-                        registerCacheName(ad.cacheName)
-
-                        sumT += (
-                            (
-                                mkCacheName(ad.cacheName),
-                                " ",
-                                formatDateTime(ad.lastRead),
-                                formatDateTime(ad.lastWrite)
-                                ),
-                            ad.nodes,
-                            (
-                                "min: " + ad.minimumSize,
-                                "avg: " + formatDouble(ad.averageSize),
-                                "max: " + ad.maximumSize
-                                ),
-                            (
-                                "min: " + ad.minimumHits,
-                                "avg: " + formatDouble(ad.averageHits),
-                                "max: " + ad.maximumHits
-                                ),
-                            (
-                                "min: " + ad.minimumMisses,
-                                "avg: " + formatDouble(ad.averageMisses),
-                                "max: " + ad.maximumMisses
-                                ),
-                            (
-                                "min: " + ad.minimumReads,
-                                "avg: " + formatDouble(ad.averageReads),
-                                "max: " + ad.maximumReads
-                                ),
-                            (
-                                "min: " + ad.minimumWrites,
-                                "avg: " + formatDouble(ad.averageWrites),
-                                "max: " + ad.maximumWrites
-                                )
-                            )
-                    }
-                )
-
-                sumT.render()
-
-                if (all) {
-                    val sorted = aggrData.sortWith((k1, k2) => {
-                        if (k1.cacheName == null)
-                            true
-                        else if (k2.cacheName == null)
-                            false
-                        else k1.cacheName.compareTo(k2.cacheName) < 0
-                    })
-
-                    val gCfg = node.map(config).collect {
-                        case cfg if cfg != null => cfg
-                    }
-
-                    sorted.foreach(ad => {
-                        val cacheNameVar = mkCacheName(ad.cacheName)
-
-                        println("\nCache '" + cacheNameVar + "':")
-
-                        val m = ad.metrics()
-
-                        val csT = VisorTextTable()
-
-                        csT += ("Name(@)", cacheNameVar)
-                        csT += ("Nodes", m.size())
-                        csT += ("Size Min/Avg/Max", ad.minimumSize + " / " + formatDouble(ad.averageSize) + " / " + ad.maximumSize)
-
-                        val ciT = VisorTextTable()
-
-                        ciT #= ("Node ID8(@), IP", "CPUs", "Heap Used", "CPU Load", "Up Time", "Size",
-                            "Last Read/Write", "Hi/Mi/Rd/Wr")
-
-                        sortData(m.toMap, sortType.getOrElse("lr"), reversed).foreach { case (nid, cm) => {
-                            val nm = grid.node(nid).metrics()
-
-                            ciT += (
-                                nodeId8Addr(nid),
-                                nm.getTotalCpus,
-                                formatDouble(nm.getHeapMemoryUsed() / nm.getHeapMemoryMaximum() * 100.0d) + " %",
-
-                                formatDouble(nm.getCurrentCpuLoad * 100.0) + " %",
-                                X.timeSpan2HMSM(nm.getUpTime),
-                                cm.size(),
-                                (
-                                    formatDateTime(cm.readTime),
-                                    formatDateTime(cm.writeTime)
-                                ),
-                                (
-                                    "Hi: " + cm.hits(),
-                                    "Mi: " + cm.misses(),
-                                    "Rd: " + cm.reads(),
-                                    "Wr: " + cm.writes()
-                                )
-                            )
-                        }}
-
-                        csT.render()
-
-                        nl()
-                        println("Nodes for: " + cacheNameVar)
-
-                        ciT.render()
-
-                        // Print footnote.
-                        println("'Hi' - Number of cache hits.")
-                        println("'Mi' - Number of cache misses.")
-                        println("'Rd' - number of cache reads.")
-                        println("'Wr' - Number of cache writes.")
-
-                        // Print metrics.
-                        nl()
-                        println("Aggregated queries metrics:")
-                        println("  Minimum execution time: " + X.timeSpan2HMSM(ad.minimumQueryTime()))
-                        println("  Maximum execution time: " + X.timeSpan2HMSM(ad.maximumQueryTime))
-                        println("  Average execution time: " + X.timeSpan2HMSM(ad.averageQueryTime.toLong))
-                        println("  Total number of executions: " + ad.execsQuery)
-                        println("  Total number of failures:   " + ad.failsQuery)
-
-                        gCfg.foreach(_.caches().find(_.name() == ad.cacheName()).foreach(cfg => {
-                            nl()
-
-                            showCacheConfiguration("Cache configuration:", cfg)
-                        }))
-                    })
-
-                }
-                else
-                    println("\nUse \"-a\" flag to see detailed statistics.")
-            }
-        }
-    }
-
-    /**
-     * Makes extended cache host attaching optional visor variable host
-     * associated with it.
-     *
-     * @param s Cache host.
-     */
-    private def mkCacheName(@Nullable s: String): String = {
-        if (s == null) {
-            val v = mfind(CACHE_DFLT)
-
-            "<default>" + (if (v.isDefined) "(@" + v.get._1 + ')' else "")
-        }
-        else {
-            val v = mfind(s)
-
-            s + (if (v.isDefined) "(@" + v.get._1 + ')' else "")
-        }
-    }
-
-    /**
-     * Registers cache host as a visor variable if one wasn't already registered.
-     *
-     * @param s Cache host.
-     */
-    private def registerCacheName(@Nullable s: String) = setVarIfAbsent(if (s != null) s else CACHE_DFLT, "c")
-
-    /**
-     * ===Command===
-     * Prints unsorted statistics about all caches.
-     *
-     * ===Examples===
-     * <ex>cache</ex>
-     * Prints unsorted statistics about all caches.
-     */
-    def cache() {
-        this.cache("")
-    }
-
-    /**
-     * Get metrics data for all caches from all node or from specified node.
-     *
-     * @return Caches metrics data.
-     */
-    private def cacheData(node: Option[ClusterNode], name: Option[String]): List[VisorCacheAggregatedMetrics] = {
-        assert(node != null)
-
-        try {
-            val prj = node.fold(grid.forRemotes())(grid.forNode(_))
-
-            val nids = prj.nodes().map(_.id())
-
-            grid.compute(prj).execute(classOf[VisorCacheMetricsCollectorTask], toTaskArgument(nids,
-                new IgniteBiTuple(new JavaBoolean(name.isEmpty), name.orNull))).toList
-        }
-        catch {
-            case e: IgniteCheckedException => Nil
-        }
-    }
-
-    /**
-     * Gets configuration of grid from specified node for callecting of node cache's configuration.
-     *
-     * @param node Specified node.
-     * @return Grid configuration for specified node.
-     */
-    private def config(node: ClusterNode): VisorGridConfiguration = {
-        try
-            grid.compute(grid.forNode(node)).withNoFailover()
-                .execute(classOf[VisorNodeConfigurationCollectorTask], emptyTaskArgument(node.id()))
-        catch {
-            case e: IgniteCheckedException =>
-                scold(e.getMessage)
-
-                null
-        }
-    }
-
-    /**
-     * Tests whether passed in parameter is a valid sorting type.
-     *
-     * @param arg Sorting type to test.
-     */
-    private def isValidSortType(arg: String): Boolean = {
-        assert(arg != null)
-
-        Set("lr", "lw", "hi", "mi", "rd", "wr", "cn").contains(arg.trim)
-    }
-
-    /**
-     * Sort metrics data.
-     *
-     * @param data Unsorted list.
-     * @param arg Sorting command argument.
-     * @param reverse Whether to reverse sorting or not.
-     * @return Sorted data.
-     */
-    private def sortData(data: Map[UUID, VisorCacheMetrics], arg: String, reverse: Boolean) = {
-        assert(data != null)
-        assert(arg != null)
-
-        val sorted = arg.trim match {
-            case "lr" => data.toSeq.sortBy(_._2.readTime)
-            case "lw" => data.toSeq.sortBy(_._2.writeTime)
-            case "hi" => data.toSeq.sortBy(_._2.hits)
-            case "mi" => data.toSeq.sortBy(_._2.misses)
-            case "rd" => data.toSeq.sortBy(_._2.reads)
-            case "wr" => data.toSeq.sortBy(_._2.writes)
-            case "cn" => data.toSeq.sortBy(_._1)
-
-            case _ =>
-                assert(false, "Unknown sorting type: " + arg)
-
-                Nil
-        }
-
-        if (reverse) sorted.reverse else sorted
-    }
-
-    /**
-     * Sort aggregated metrics data.
-     *
-     * @param data Unsorted list.
-     * @param arg Command argument.
-     * @param reverse Whether to reverse sorting or not.
-     * @return Sorted data.
-     */
-    private def sortAggregatedData(data: Iterable[VisorCacheAggregatedMetrics], arg: String, reverse: Boolean):
-        List[VisorCacheAggregatedMetrics] = {
-
-        val sorted = arg.trim match {
-            case "lr" => data.toList.sortBy(_.lastRead)
-            case "lw" => data.toList.sortBy(_.lastWrite)
-            case "hi" => data.toList.sortBy(_.averageHits)
-            case "mi" => data.toList.sortBy(_.averageMisses)
-            case "rd" => data.toList.sortBy(_.averageReads)
-            case "wr" => data.toList.sortBy(_.averageWrites)
-            case "cn" => data.toList.sortWith((x, y) =>
-                x.cacheName == null || (y.cacheName != null && x.cacheName.toLowerCase < y.cacheName.toLowerCase))
-
-            case _ =>
-                assert(false, "Unknown sorting type: " + arg)
-
-                Nil
-        }
-
-        if (reverse) sorted.reverse else sorted
-    }
-
-    /**
-     * Asks user to select a cache from the list.
-     *
-     * @param title Title displayed before the list of caches.
-     * @return `Option` for ID of selected cache.
-     */
-    def askForCache(title: String, node: Option[ClusterNode]): Option[String] = {
-        assert(title != null)
-        assert(visor.isConnected)
-
-        // Get cache stats data from all nodes.
-        val aggrData = cacheData(node, None)
-
-        if (aggrData.isEmpty)
-            scold("No caches found.").^^
-
-        val sortedAggrData = sortAggregatedData(aggrData, "cn", false)
-
-        println("Time of the snapshot: " + formatDateTime(System.currentTimeMillis))
-
-        val sumT = VisorTextTable()
-
-        sumT #= ("#", ("Name(@),", "Last Read/Write"), "Nodes", "Size")
-
-        (0 until sortedAggrData.size) foreach (i => {
-            val ad = sortedAggrData(i)
-
-            // Add cache host as visor variable.
-            registerCacheName(ad.cacheName)
-
-            sumT += (
-                i,
-                (
-                    mkCacheName(ad.cacheName),
-                    " ",
-                    formatDateTime(ad.lastRead),
-                    formatDateTime(ad.lastWrite)
-                    ),
-                ad.nodes,
-                (
-                    "min: " + ad.minimumSize,
-                    "avg: " + formatDouble(ad.averageSize),
-                    "max: " + ad.maximumSize
-                ))
-        })
-
-        sumT.render()
-
-        val a = ask("\nChoose cache number ('c' to cancel) [c]: ", "c")
-
-        if (a.toLowerCase == "c")
-            None
-        else {
-            try
-                Some(sortedAggrData(a.toInt).cacheName)
-            catch {
-                case e: Throwable =>
-                    warn("Invalid selection: " + a)
-
-                    None
-            }
-        }
-    }
-}
-
-/**
- * Companion object that does initialization of the command.
- */
-object VisorCacheCommand {
-    addHelp(
-        name = "cache",
-        shortInfo = "Prints cache statistics, clears cache, compacts entries in cache, prints list of all entries from cache.",
-        longInfo = Seq(
-            "Prints statistics about caches from specified node on the entire grid.",
-            "Output sorting can be specified in arguments.",
-            " ",
-            "Output abbreviations:",
-            "    #   Number of nodes.",
-            "    H/h Number of cache hits.",
-            "    M/m Number of cache misses.",
-            "    R/r Number of cache reads.",
-            "    W/w Number of cache writes.",
-            " ",
-            "Clears cache.",
-            " ",
-            "Compacts entries in cache.",
-            " ",
-            "Prints list of all entries from cache.",
-            " ",
-            "Swaps backup entries in cache."
-        ),
-        spec = Seq(
-            "cache",
-            "cache -i",
-            "cache {-c=<cache-name>} {-id=<node-id>|id8=<node-id8>} {-s=lr|lw|hi|mi|re|wr} {-a} {-r}",
-            "cache -compact {-c=<cache-name>} {-id=<node-id>|id8=<node-id8>}",
-            "cache -clear {-c=<cache-name>} {-id=<node-id>|id8=<node-id8>}",
-            "cache -scan -c=<cache-name> {-id=<node-id>|id8=<node-id8>} {-p=<page size>}",
-            "cache -swap {-c=<cache-name>} {-id=<node-id>|id8=<node-id8>}"
-    ),
-        args = Seq(
-            "-id=<node-id>" -> Seq(
-                "Full ID of the node to get cache statistics from.",
-                "Either '-id8' or '-id' can be specified.",
-                "If neither is specified statistics will be gathered from all nodes."
-            ),
-            "-id8=<node-id>" -> Seq(
-                "ID8 of the node to get cache statistics from.",
-                "Either '-id8' or '-id' can be specified.",
-                "If neither is specified statistics will be gathered from all nodes.",
-                "Note you can also use '@n0' ... '@nn' variables as shortcut to <node-id>."
-            ),
-            "-c=<cache-name>" -> Seq(
-                "Name of the cache.",
-                "Note you can also use '@c0' ... '@cn' variables as shortcut to <cache-name>."
-            ),
-            "-compact" -> Seq(
-                "Compacts entries in cache."
-            ),
-            "-clear" -> Seq(
-                "Clears cache."
-            ),
-            "-scan" -> Seq(
-                "Prints list of all entries from cache."
-            ),
-            "-swap" -> Seq(
-                "Swaps backup entries in cache."
-            ),
-            "-s=lr|lw|hi|mi|re|wr|cn" -> Seq(
-                "Defines sorting type. Sorted by:",
-                "   lr Last read.",
-                "   lw Last write.",
-                "   hi Hits.",
-                "   mi Misses.",
-                "   rd Reads.",
-                "   wr Writes.",
-                "   cn Cache name.",
-                "If not specified - default sorting is 'lr'."
-            ),
-            "-i" -> Seq(
-                "Interactive mode.",
-                "User can interactively select node for cache statistics."
-            ),
-            "-r" -> Seq(
-                "Defines if sorting should be reversed.",
-                "Can be specified only with '-s' argument."
-            ),
-            "-a" -> Seq(
-                "Prints details statistics about each cache.",
-                "By default only aggregated summary is printed."
-            ),
-            "-p=<page size>" -> Seq(
-                "Number of object to fetch from cache at once.",
-                "Valid range from 1 to 100.",
-                "By default page size is 25."
-            )
-        ),
-        examples = Seq(
-            "cache" ->
-                "Prints summary statistics about all caches.",
-            "cache -i" ->
-                "Prints cache statistics for interactively selected node.",
-            "cache -id8=12345678 -s=hi -r"  -> Seq(
-                "Prints summary statistics about caches from node with specified id8",
-                "sorted by number of hits in reverse order."
-            ),
-            "cache -id8=@n0 -s=hi -r"  -> Seq(
-                "Prints summary statistics about caches from node with id8 taken from 'n0' memory variable.",
-                "sorted by number of hits in reverse order."
-            ),
-            "cache -c=@c0 -a"  -> Seq(
-                "Prints detailed statistics about cache with name taken from 'c0' memory variable."
-            ),
-            "cache -s=hi -r -a" ->
-                "Prints detailed statistics about all caches sorted by number of hits in reverse order.",
-            "cache -compact" -> "Compacts entries in interactively selected cache.",
-            "cache -compact -c=cache" -> "Compacts entries in cache with name 'cache'.",
-            "cache -compact -c=@c0" -> "Compacts cache with name taken from 'c0' memory variable.",
-            "cache -clear" -> "Clears interactively selected cache.",
-            "cache -clear -c=cache" -> "Clears cache with name 'cache'.",
-            "cache -clear -c=@c0" -> "Clears cache with name taken from 'c0' memory variable.",
-            "cache -scan" -> "Prints list entries from interactively selected cache.",
-            "cache -scan -c=cache" -> "List entries from cache with name 'cache' from all nodes with this cache.",
-            "cache -scan -c=@c0 -p=50" -> ("Prints list entries from cache with name taken from 'c0' memory variable" +
-                " with page of 50 items from all nodes with this cache."),
-            "cache -scan -c=cache -id8=12345678" -> "Prints list entries from cache with name 'cache' and node '12345678' ID8.",
-            "cache -swap" -> "Swaps entries in interactively selected cache.",
-            "cache -swap -c=cache" -> "Swaps entries in cache with name 'cache'.",
-            "cache -swap -c=@c0" -> "Swaps entries in cache with name taken from 'c0' memory variable."
-        ),
-        ref = VisorConsoleCommand(cmd.cache, cmd.cache)
-    )
-
-    /** Default cache key. */
-    protected val CACHE_DFLT = "<default>-" + UUID.randomUUID().toString
-
-    /** Singleton command */
-    private val cmd = new VisorCacheCommand
-
-    /**
-     * Singleton.
-     */
-    def apply() = cmd
-
-    /**
-     * Implicit converter from visor to commands "pimp".
-     *
-     * @param vs Visor tagging trait.
-     */
-    implicit def fromCinfo2Visor(vs: VisorTag) = cmd
-
-    /**
-     * Show table of cache configuration information.
-     *
-     * @param title Specified title for table.
-     * @param cfg Config to show information.
-     */
-    private[commands] def showCacheConfiguration(title: String, cfg: VisorCacheConfiguration) {
-        val affinityCfg = cfg.affinityConfiguration()
-        val nearCfg = cfg.nearConfiguration()
-        val preloadCfg = cfg.preloadConfiguration()
-        val evictCfg = cfg.evictConfiguration()
-        val defaultCfg = cfg.defaultConfiguration()
-        val dgcCfg = cfg.dgcConfiguration()
-        val storeCfg = cfg.storeConfiguration()
-        val writeBehind = cfg.writeBehind()
-
-        val cacheT = VisorTextTable()
-
-        cacheT #= ("Name", "Value")
-
-        cacheT += ("Mode", cfg.mode)
-        cacheT += ("Atomicity Mode", cfg.atomicityMode)
-        cacheT += ("Atomic Sequence Reserve Size", cfg.atomicSequenceReserveSize)
-        cacheT += ("Atomic Write Ordering Mode", cfg.atomicWriteOrderMode)
-
-        cacheT += ("Time To Live", defaultCfg.timeToLive())
-        cacheT += ("Time To Live Eager Flag", cfg.eagerTtl)
-
-        cacheT += ("Write Synchronization Mode", cfg.writeSynchronizationMode)
-        cacheT += ("Swap Enabled", cfg.swapEnabled())
-        cacheT += ("Invalidate", cfg.invalidate())
-        cacheT += ("Start Size", cfg.startSize())
-        cacheT += ("Cloner", cfg.cloner())
-        cacheT += ("Batch Update", cfg.batchUpdateOnCommit())
-
-        cacheT += ("Transaction Manager Lookup", cfg.transactionManagerLookupClassName())
-        cacheT += ("Transaction Serializable", cfg.txSerializableEnabled)
-
-        cacheT += ("Affinity Function", affinityCfg.function())
-        cacheT += ("Affinity Backups", affinityCfg.partitionedBackups())
-        cacheT += ("Affinity Partitions", affinityCfg.partitions())
-        cacheT += ("Affinity Default Replicas", affinityCfg.defaultReplicas())
-        cacheT += ("Affinity Exclude Neighbors", affinityCfg.excludeNeighbors())
-        cacheT += ("Affinity Mapper", affinityCfg.mapper())
-
-        cacheT += ("Preload Mode", preloadCfg.mode())
-        cacheT += ("Preload Batch Size", preloadCfg.batchSize())
-        cacheT += ("Preload Thread Pool size", preloadCfg.threadPoolSize())
-        cacheT += ("Preload Timeout", preloadCfg.timeout())
-        cacheT += ("Preloading Delay", preloadCfg.partitionedDelay())
-        cacheT += ("Time Between Preload Messages", preloadCfg.throttle())
-
-        cacheT += ("Eviction Policy Enabled", evictCfg.policy() != null)
-        cacheT += ("Eviction Policy", evictCfg.policy())
-        cacheT += ("Eviction Policy Max Size", evictCfg.policyMaxSize())
-        cacheT += ("Eviction Filter", evictCfg.filter())
-        cacheT += ("Eviction Key Buffer Size", evictCfg.synchronizedKeyBufferSize())
-        cacheT += ("Eviction Synchronized", evictCfg.evictSynchronized())
-        cacheT += ("Eviction Overflow Ratio", evictCfg.maxOverflowRatio())
-        cacheT += ("Synchronous Eviction Timeout", evictCfg.synchronizedTimeout())
-        cacheT += ("Synchronous Eviction Concurrency Level", evictCfg.synchronizedConcurrencyLevel())
-
-        cacheT += ("Distribution Mode", cfg.distributionMode())
-
-        cacheT += ("Near Start Size", nearCfg.nearStartSize())
-        cacheT += ("Near Eviction Policy", nearCfg.nearEvictPolicy())
-        cacheT += ("Near Eviction Enabled", nearCfg.nearEnabled())
-        cacheT += ("Near Eviction Synchronized", evictCfg.nearSynchronized())
-        cacheT += ("Near Eviction Policy Max Size", nearCfg.nearEvictMaxSize())
-
-        cacheT += ("Default Isolation", defaultCfg.txIsolation())
-        cacheT += ("Default Concurrency", defaultCfg.txConcurrency())
-        cacheT += ("Default Transaction Timeout", defaultCfg.txTimeout())
-        cacheT += ("Default Lock Timeout", defaultCfg.txLockTimeout())
-        cacheT += ("Default Query Timeout", defaultCfg.queryTimeout())
-        cacheT += ("Query Indexing Enabled", cfg.queryIndexEnabled())
-        cacheT += ("Query Iterators Number", cfg.maxQueryIteratorCount())
-        cacheT += ("Indexing SPI Name", cfg.indexingSpiName())
-        cacheT += ("Cache Interceptor", cfg.interceptor())
-
-        cacheT += ("DGC Frequency", dgcCfg.frequency())
-        cacheT += ("DGC Remove Locks Flag", dgcCfg.removedLocks())
-        cacheT += ("DGC Suspect Lock Timeout", dgcCfg.suspectLockTimeout())
-
-        cacheT += ("Store Enabled", storeCfg.enabled())
-        cacheT += ("Store", storeCfg.store())
-        cacheT += ("Store Values In Bytes", storeCfg.valueBytes())
-
-        cacheT += ("Off-Heap Size", cfg.offsetHeapMaxMemory())
-
-        cacheT += ("Write-Behind Enabled", writeBehind.enabled())
-        cacheT += ("Write-Behind Flush Size", writeBehind.flushSize())
-        cacheT += ("Write-Behind Frequency", writeBehind.flushFrequency())
-        cacheT += ("Write-Behind Flush Threads Count", writeBehind.flushThreadCount())
-        cacheT += ("Write-Behind Batch Size", writeBehind.batchSize())
-
-        cacheT += ("Pessimistic Tx Log Size", cfg.pessimisticTxLoggerSize())
-        cacheT += ("Pessimistic Tx Log Linger", cfg.pessimisticTxLoggerLinger())
-        cacheT += ("Concurrent Asynchronous Operations Number", cfg.maxConcurrentAsyncOperations())
-        cacheT += ("Memory Mode", cfg.memoryMode())
-
-        println(title)
-
-        cacheT.render()
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e1c3c8ce/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
deleted file mode 100644
index a3e6e0e..0000000
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheCompactCommand.scala
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gridgain.visor.commands.cache
-
-import org.apache.ignite.internal.visor.cache.VisorCacheCompactTask
-import org.apache.ignite.internal.visor.util.VisorTaskUtils._
-
-import org.apache.ignite.cluster.ClusterNode
-
-import java.util.Collections
-
-import org.gridgain.visor.commands.VisorTextTable
-import org.gridgain.visor.visor._
-
-import scala.collection.JavaConversions._
-import scala.language.reflectiveCalls
-import scala.util.control.Breaks._
-
-/**
- * ==Overview==
- * Visor 'compact' command implementation.
- *
- * ==Help==
- * {{{
- * +--------------------------------------------------------+
- * | compact | Compacts all entries in cache on all nodes. |
- * +--------------------------------------------------------+
- * }}}
- *
- * ====Specification====
- * {{{
- *     compact
- *     compact -c=<cache-name>
- * }}}
- *
- * ====Arguments====
- * {{{
- *     <cache-name>
- *         Name of the cache.
- *         If not specified, entries in default cache will be compacted.
- * }}}
- *
- * ====Examples====
- * {{{
- *     compact
- *         Compacts entries in interactively selected cache.
- *     compact -c=cache
- *         Compacts entries in cache with name 'cache'.
- * }}}
- */
-class VisorCacheCompactCommand {
-    /**
-     * Prints error message and advise.
-     *
-     * @param errMsgs Error messages.
-     */
-    private def scold(errMsgs: Any*) {
-        assert(errMsgs != null)
-
-        warn(errMsgs: _*)
-        warn("Type 'help cache' to see how to use this command.")
-    }
-
-    /**
-     * ===Command===
-     * Compacts entries in cache.
-     *
-     * ===Examples===
-     * <ex>cache -compact -c=cache</ex>
-     * Compacts entries in cache with name 'cache'.
-     *
-     * @param argLst Command arguments.
-     */
-    def compact(argLst: ArgList, node: Option[ClusterNode]) = breakable {
-        val cacheArg = argValue("c", argLst)
-
-        val cacheName = cacheArg match {
-            case None => null // default cache.
-
-            case Some(s) if s.startsWith("@") =>
-                warn("Can't find cache variable with specified name: " + s,
-                    "Type 'cache' to see available cache variables."
-                )
-
-                break()
-
-            case Some(name) => name
-        }
-
-        val prj = if (node.isDefined) grid.forNode(node.get) else grid.forCache(cacheName)
-
-        if (prj.nodes().isEmpty) {
-            val msg =
-                if (cacheName == null)
-                    "Can't find nodes with default cache."
-                else
-                    "Can't find nodes with specified cache: " + cacheName
-
-            scold(msg).^^
-        }
-
-        val t = VisorTextTable()
-
-        t #= ("Node ID8(@)", "Entries Compacted", "Cache Size Before", "Cache Size After")
-
-        val cacheSet = Collections.singleton(cacheName)
-
-        prj.nodes().foreach(node => {
-            val r = grid.compute(grid.forNode(node))
-                .withName("visor-ccompact-task")
-                .withNoFailover()
-                .execute(classOf[VisorCacheCompactTask], toTaskArgument(node.id(), cacheSet))
-                .get(cacheName)
-
-            t += (nodeId8(node.id()), r.get1() - r.get2(), r.get1(), r.get2())
-        })
-
-        println("Compacts entries in cache: " + escapeName(cacheName))
-
-        t.render()
-    }
-}
-
-/**
- * Companion object that does initialization of the command.
- */
-object VisorCacheCompactCommand {
-    /** Singleton command. */
-    private val cmd = new VisorCacheCompactCommand
-
-    /**
-     * Singleton.
-     */
-    def apply() = cmd
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e1c3c8ce/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
deleted file mode 100644
index 1a08361..0000000
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheScanCommand.scala
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gridgain.visor.commands.cache
-
-import org.apache.ignite.internal.visor.query.VisorQueryTask.VisorQueryArg
-import org.apache.ignite.internal.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._
-
-import scala.collection.JavaConversions._
-
-/**
- * ==Overview==
- * Visor 'scan' command implementation.
- *
- * ====Specification====
- * {{{
- *     cache {-id=<node-id>|-id8=<node-id8>} {-p=<page size>} -c=<cache name> -scan
- * }}}
- *
- * ====Arguments====
- * {{{
- *     <node-id>
- *         Full node ID.
- *     <node-id8>
- *         Node ID8.
- *     <page size>
- *         Number of object to fetch from cache at once.
- *     <cache-name>
- *         Name of the cache.
- * }}}
- *
- * ====Examples====
- * {{{
- *    cache -c=cache
- *        List entries from cache with name 'cache' from all nodes with this cache.
- *    cache -c=@c0 -scan -p=50
- *        List entries from cache with name taken from 'c0' memory variable with page of 50 items
- *        from all nodes with this cache.
- *    cache -c=cache -scan -id8=12345678
- *        List entries from cache with name 'cache' and node '12345678' ID8.
- * }}}
- */
-class VisorCacheScanCommand {
-    /**
-     * Prints error message and advise.
-     *
-     * @param errMsgs Error messages.
-     */
-    private def scold(errMsgs: Any*) {
-        assert(errMsgs != null)
-
-        warn(errMsgs: _*)
-        warn("Type 'help cache' to see how to use this command.")
-    }
-
-    private def error(e: Exception) {
-        var cause: Throwable = e
-
-        while (cause.getCause != null)
-            cause = cause.getCause
-
-        scold(cause.getMessage)
-    }
-
-    /**
-     * ===Command===
-     * List all entries in cache with specified name.
-     *
-     * ===Examples===
-     * <ex>cache -c=cache -scan</ex>
-     *     List entries from cache with name 'cache' from all nodes with this cache.
-     * <br>
-     * <ex>cache -c=@c0 -scan -p=50</ex>
-     *     List entries from cache with name taken from 'c0' memory variable with page of 50 items
-     *     from all nodes with this cache.
-     * <br>
-     * <ex>cache -c=cache -scan -id8=12345678</ex>
-     *     List entries from cache with name 'cache' and node '12345678' ID8.
-     *
-     * @param argLst Command arguments.
-     */
-    def scan(argLst: ArgList, node: Option[ClusterNode]) {
-        val pageArg = argValue("p", argLst)
-        val cacheArg = argValue("c", argLst)
-
-        var pageSize = 25
-
-        if (pageArg.isDefined) {
-            val page = pageArg.get
-
-            try
-             pageSize = page.toInt
-            catch {
-                case nfe: NumberFormatException =>
-                    scold("Invalid value for 'page size': " + page)
-
-                    return
-            }
-
-            if (pageSize < 1 || pageSize > 100) {
-                scold("'Page size' should be in range [1..100] but found: " + page)
-
-                return
-            }
-        }
-
-        val cacheName = cacheArg match {
-            case None => null // default cache.
-
-            case Some(s) if s.startsWith("@") =>
-                warn("Can't find cache variable with specified name: " + s,
-                    "Type 'cache' to see available cache variables."
-                )
-
-                return
-
-            case Some(name) => name
-        }
-
-        val cachePrj = node match {
-            case Some(n) => grid.forNode(n).forCache(cacheName)
-            case _ => grid.forCache(cacheName)
-        }
-
-        if (cachePrj.nodes().isEmpty) {
-            warn("Can't find nodes with specified cache: " + cacheName,
-                "Type 'cache' to see available cache names."
-            )
-
-            return
-        }
-
-        val qryPrj = cachePrj.forRandom()
-        val proj = new java.util.HashSet(cachePrj.nodes().map(_.id()))
-
-        val nid = qryPrj.node().id()
-
-        val fullRes =
-            try
-                grid.compute(qryPrj)
-                    .withName("visor-cscan-task")
-                    .withNoFailover()
-                    .execute(classOf[VisorQueryTask],
-                        toTaskArgument(nid, new VisorQueryArg(proj, cacheName, "SCAN", pageSize)))
-                    match {
-                    case x if x.get1() != null =>
-                        error(x.get1())
-
-                        return
-                    case x => x.get2()
-                }
-            catch {
-                case e: Exception =>
-                    error(e)
-
-                    return
-            }
-
-        def escapeCacheName(name: String) = if (name == null) "<default>" else name
-
-        var res: VisorQueryResult = fullRes
-
-        if (res.rows.isEmpty) {
-            println("Cache: " + escapeCacheName(cacheName) + " is empty")
-
-            return
-        }
-
-        def render() {
-            println("Entries in cache: " + escapeCacheName(cacheName))
-
-            val t = VisorTextTable()
-
-            t #= ("Key Class", "Key", "Value Class", "Value")
-
-            res.rows.foreach(r => t += (r(0), r(1), r(2), r(3)))
-
-            t.render()
-        }
-
-        render()
-
-        while (res.hasMore) {
-            ask("\nFetch more objects (y/n) [y]:", "y") match {
-                case "y" | "Y" =>
-                    try {
-                        res = grid.compute(qryPrj)
-                            .withName("visor-cscan-fetch-task")
-                            .withNoFailover()
-                            .execute(classOf[VisorQueryNextPageTask],
-                                toTaskArgument(nid, new IgniteBiTuple[String, Integer](fullRes.queryId(), pageSize)))
-
-                        render()
-                    }
-                    catch {
-                        case e: Exception => error(e)
-                    }
-                case _ => return
-            }
-
-        }
-    }
-}
-
-/**
- * Companion object that does initialization of the command.
- */
-object VisorCacheScanCommand {
-    /** Singleton command. */
-    private val cmd = new VisorCacheScanCommand
-
-    /**
-     * Singleton.
-     */
-    def apply() = cmd
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e1c3c8ce/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
deleted file mode 100644
index ca46086..0000000
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/cache/VisorCacheSwapCommand.scala
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gridgain.visor.commands.cache
-
-import org.apache.ignite.internal.visor.cache.VisorCacheSwapBackupsTask
-import org.apache.ignite.internal.visor.util.VisorTaskUtils._
-
-import org.apache.ignite.cluster.ClusterNode
-
-import java.util.Collections
-
-import org.gridgain.visor.commands.VisorTextTable
-import org.gridgain.visor.visor._
-
-import scala.collection.JavaConversions._
-import scala.language.{implicitConversions, reflectiveCalls}
-import scala.util.control.Breaks._
-
-/**
- * ==Overview==
- * Visor 'cswap' command implementation.
- *
- * ==Help==
- * {{{
- * +-----------------------------------------------------+
- * | cswap | Swaps backup entries in cache on all nodes. |
- * +-----------------------------------------------------+
- * }}}
- *
- * ====Specification====
- * {{{
- *     cache -swap
- *     cache -swap -c=<cache-name>
- * }}}
- *
- * ====Arguments====
- * {{{
- *     <cache-name>
- *         Name of the cache.
- *         If not specified, entries in default cache will be swapped.
- * }}}
- *
- * ====Examples====
- * {{{
- *     cache -swap
- *         Swaps entries in interactively selected cache.
- *     cache -swap -c=cache
- *         Swaps entries in cache with name 'cache'.
- * }}}
- */
-class VisorCacheSwapCommand {
-    /**
-     * Prints error message and advise.
-     *
-     * @param errMsgs Error messages.
-     */
-    private def scold(errMsgs: Any*) {
-        assert(errMsgs != null)
-
-        warn(errMsgs: _*)
-        warn("Type 'help cswap' to see how to use this command.")
-    }
-
-    /**
-     * ===Command===
-     * Swaps entries in cache.
-     *
-     * ===Examples===
-     * <ex>cache -swap -c=cache</ex>
-     * Swaps entries in cache with name 'cache'.
-     *
-     * @param argLst Command arguments.
-     */
-    def swap(argLst: ArgList, node: Option[ClusterNode]) = breakable {
-        val cacheArg = argValue("c", argLst)
-
-        val cacheName = cacheArg match {
-            case None => null // default cache.
-
-            case Some(s) if s.startsWith("@") =>
-                warn("Can't find cache variable with specified name: " + s,
-                    "Type 'cache' to see available cache variables."
-                )
-
-                break()
-
-            case Some(name) => name
-        }
-
-        val prj = if (node.isDefined) grid.forNode(node.get) else grid.forCache(cacheName)
-
-        if (prj.nodes().isEmpty) {
-            val msg =
-                if (cacheName == null)
-                    "Can't find nodes with default cache."
-                else
-                    "Can't find nodes with specified cache: " + cacheName
-
-            scold(msg).^^
-        }
-
-        val t = VisorTextTable()
-
-        t #= ("Node ID8(@)", "Entries Swapped", "Cache Size Before", "Cache Size After")
-
-        val cacheSet = Collections.singleton(cacheName)
-
-        prj.nodes().foreach(node => {
-            val r = grid.compute(grid.forNode(node))
-                .withName("visor-cswap-task")
-                .withNoFailover()
-                .execute(classOf[VisorCacheSwapBackupsTask], toTaskArgument(node.id(), cacheSet))
-                .get(cacheName)
-
-            t += (nodeId8(node.id()), r.get1() - r.get2(), r.get1(), r.get2())
-        })
-
-        println("Swapped entries in cache: " + escapeName(cacheName))
-
-        t.render()
-    }
-}
-
-/**
- * Companion object that does initialization of the command.
- */
-object VisorCacheSwapCommand {
-    /** Singleton command. */
-    private val cmd = new VisorCacheSwapCommand
-
-    /**
-     * Singleton.
-     */
-    def apply() = cmd
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e1c3c8ce/modules/visor-console/src/main/scala/org/gridgain/visor/commands/config/Packet.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/config/Packet.scala b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/config/Packet.scala
deleted file mode 100644
index b786cbf..0000000
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/config/Packet.scala
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gridgain.visor.commands
-
-/**
- * ==Overview==
- * Visor 'config' command implementation.
- *
- * ==Help==
- * {{{
- * +-------------------------------------+
- * | config | Prints node configuration. |
- * +-------------------------------------+
- * }}}
- *
- * ====Specification====
- * {{{
- *     config
- *     config "{-id=<node-id>|id8=<node-id8>}"
- * }}}
- *
- * ====Arguments====
- * {{{
- *     -id=<node-id>
- *         Full node ID. Either '-id8' or '-id' can be specified.
- *         If neither is specified - command starts in interactive mode.
- *     -id8=<node-id8>
- *         Node ID8. Either '-id8' or '-id' can be specified.
- *         If neither is specified - command starts in interactive mode.
- * }}}
- *
- * ====Examples====
- * {{{
- *     config "-id8=12345678"
- *         Prints configuration for node with '12345678' ID8.
- *     config
- *         Starts command in interactive mode.
- * }}}
- */
-package object config

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e1c3c8ce/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
deleted file mode 100644
index 3eeb108..0000000
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/config/VisorConfigurationCommand.scala
+++ /dev/null
@@ -1,501 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gridgain.visor.commands.config
-
-import org.apache.ignite.internal.util.GridUtils
-import org.apache.ignite.internal.util.typedef.internal.U
-import org.apache.ignite.internal.visor.node.VisorNodeConfigurationCollectorTask
-
-import org.apache.ignite._
-import org.apache.ignite.cluster.ClusterNode
-import org.apache.ignite.lang.IgniteBiTuple
-
-import java.lang.System._
-
-import org.gridgain.visor._
-import org.gridgain.visor.commands.cache.VisorCacheCommand
-import org.gridgain.visor.commands.{VisorConsoleCommand, VisorTextTable}
-import org.gridgain.visor.visor._
-
-import scala.collection.JavaConversions._
-import scala.language.implicitConversions
-import scala.reflect.ClassTag
-import scala.util.control.Breaks._
-
-/**
- * ==Overview==
- * Visor 'config' command implementation.
- *
- * ==Importing==
- * When using this command from Scala code (not from REPL) you need to make sure to
- * properly import all necessary typed and implicit conversions:
- * <ex>
- * import org.gridgain.visor._
- * import commands.config.VisorConfigurationCommand._
- * </ex>
- * Note that `VisorConfigurationCommand` object contains necessary implicit conversions so that
- * this command would be available via `visor` keyword.
- *
- * ==Help==
- * {{{
- * +-------------------------------------+
- * | config | Prints node configuration. |
- * +-------------------------------------+
- * }}}
- *
- * ====Specification====
- * {{{
- *     config
- *     config "{-id=<node-id>|id8=<node-id8>}"
- * }}}
- *
- * ====Arguments====
- * {{{
- *     -id=<node-id>
- *         Full node ID. Either '-id8' or '-id' can be specified.
- *         If neither is specified - command starts in interactive mode.
- *     -id8=<node-id8>
- *         Node ID8. Either '-id8' or '-id' can be specified.
- *         If neither is specified - command starts in interactive mode.
- * }}}
- *
- * ====Examples====
- * {{{
- *     config "-id8=12345678"
- *         Prints configuration for node with '12345678' ID8.
- *     config
- *         Starts command in interactive mode.
- * }}}
- */
-class VisorConfigurationCommand {
-    /** Default value */
-    private val DFLT = "<n/a>"
-
-    /**
-     * Prints error message and advise.
-     *
-     * @param errMsgs Error messages.
-     */
-    private def scold(errMsgs: Any*) {
-        assert(errMsgs != null)
-
-        warn(errMsgs: _*)
-        warn("Type 'help config' to see how to use this command.")
-    }
-
-    /**
-     * Joins array elements to string.
-     *
-     * @param arr Array.
-     * @return String.
-     */
-    private def arr2Str[T: ClassTag](arr: Array[T]): String = {
-        if (arr != null && arr.length > 0) GridUtils.compact(arr.mkString(", ")) else DFLT
-    }
-
-    /**
-     * Converts `Boolean` to 'Yes'/'No' string.
-     *
-     * @param bool Boolean value.
-     * @return String.
-     */
-    private def bool2Str(bool: Boolean): String = {
-        if (bool) "on" else "off"
-    }
-
-    /**
-      * ===Command===
-      * Run command in interactive mode.
-      *
-      * ===Examples===
-      * <ex>config</ex>
-      * Starts command in interactive mode.
-     */
-    def config() {
-        if (!isConnected)
-            adviseToConnect()
-        else
-            askForNode("Select node from:") match {
-                case Some(id) => config("-id=" + id)
-                case None => ()
-            }
-    }
-
-    /**
-     * ===Command===
-     * Prints configuration of specified node including all caches.
-     *
-     * ===Examples===
-     * <ex>config "-id8=12345678"</ex>
-     * Prints configuration of node with '12345678' ID8.
-     *
-     * @param args Command arguments.
-     */
-    def config(args: String) {
-        breakable {
-            if (!isConnected) {
-                adviseToConnect()
-
-                break()
-            }
-
-            val argLst = parseArgs(args)
-
-            val id8 = argValue("id8", argLst)
-            val id = argValue("id", argLst)
-
-            var node: ClusterNode = null
-
-            if (id8.isEmpty && id.isEmpty) {
-                scold("One of -id8 or -id is required.")
-
-                break()
-            }
-
-            if (id8.isDefined && id.isDefined) {
-                scold("Only one of -id8 or -id is allowed.")
-
-                break()
-            }
-
-            if (id8.isDefined) {
-                val ns = nodeById8(id8.get)
-
-                if (ns.isEmpty) {
-                    scold("Unknown 'id8' value: " + id8.get)
-
-                    break()
-                }
-                else if (ns.size != 1) {
-                    scold("'id8' resolves to more than one node (use full 'id' instead): " + id8.get)
-
-                    break()
-                }
-                else
-                    node = ns.head
-            }
-            else if (id.isDefined)
-                try {
-                    node = grid.node(java.util.UUID.fromString(id.get))
-
-                    if (node == null) {
-                        scold("'id' does not match any node: " + id.get)
-
-                        break()
-                    }
-                }
-                catch {
-                    case e: IllegalArgumentException =>
-                        scold("Invalid node 'id': " + id.get)
-
-                        break()
-                }
-
-            assert(node != null)
-
-            val cfg = try
-                grid.compute(grid.forNode(node))
-                    .withNoFailover()
-                    .execute(classOf[VisorNodeConfigurationCollectorTask], emptyTaskArgument(node.id()))
-            catch {
-                case e: IgniteCheckedException =>
-                    scold(e.getMessage)
-
-                    break()
-            }
-
-            println("Common Parameters:")
-
-            val cmnT = VisorTextTable()
-
-            cmnT += ("Grid name", safe(cfg.basic().gridName(), "<default>"))
-            cmnT += ("GridGain home", safe(cfg.basic().ggHome(), DFLT))
-            cmnT += ("Localhost", safe(cfg.basic().localHost(), DFLT))
-            cmnT += ("Node ID", safe(cfg.basic().nodeId(), DFLT))
-            cmnT += ("Marshaller", cfg.basic().marshaller())
-            cmnT += ("Deployment mode", safe(cfg.basic().deploymentMode(), DFLT))
-            cmnT += ("Daemon", bool2Str(cfg.basic().daemon()))
-            cmnT += ("Remote JMX", bool2Str(cfg.basic().jmxRemote()))
-            cmnT += ("Restart", bool2Str(cfg.basic().restart()))
-            cmnT += ("Network timeout", cfg.basic().networkTimeout() + "ms")
-            cmnT += ("License URL", safe(cfg.basic().licenseUrl(), DFLT))
-            cmnT += ("Grid logger", safe(cfg.basic().logger(), DFLT))
-            cmnT += ("Discovery startup delay", cfg.basic().discoStartupDelay() + "ms")
-            cmnT += ("MBean server", safe(cfg.basic().mBeanServer(), DFLT))
-            cmnT += ("ASCII logo disabled", bool2Str(cfg.basic().noAscii()))
-            cmnT += ("Discovery order not required", bool2Str(cfg.basic().noDiscoOrder()))
-            cmnT += ("Shutdown hook disabled", bool2Str(cfg.basic().noShutdownHook()))
-            cmnT += ("Program name", safe(cfg.basic(). programName(), DFLT))
-            cmnT += ("Quiet mode", bool2Str(cfg.basic().quiet()))
-            cmnT += ("Success filename", safe(cfg.basic().successFile(), DFLT))
-            cmnT += ("Update notification", bool2Str(cfg.basic().updateNotifier()))
-            cmnT += ("Security credentials", safe(cfg.basic().securityCredentialsProvider(), DFLT))
-            cmnT += ("Include properties", safe(cfg.includeProperties(), DFLT))
-
-            cmnT.render()
-
-            println("\nMetrics:")
-
-            val metricsT = VisorTextTable()
-
-            val expTime = cfg.metrics().expireTime()
-
-            metricsT += ("Metrics expire time", if (expTime != Long.MaxValue) expTime + "ms" else "<never>")
-            metricsT += ("Metrics history size", cfg.metrics().historySize())
-            metricsT += ("Metrics log frequency", cfg.metrics().loggerFrequency())
-
-            metricsT.render()
-
-            println("\nSPIs:")
-
-            val spisT = VisorTextTable()
-
-            def spiClass(spi: IgniteBiTuple[String, java.util.Map[String, AnyRef]]) = {
-                if (spi != null) spi.get2().getOrElse("Class Name", DFLT) else DFLT
-            }
-
-            def spisClass(spis: Array[IgniteBiTuple[String, java.util.Map[String, AnyRef]]]) = {
-                spis.map(spiClass).mkString("[", ", ", "]")
-            }
-
-            spisT += ("Discovery", spiClass(cfg.spis().discoverySpi()))
-            spisT += ("Communication", spiClass(cfg.spis().communicationSpi()))
-            spisT += ("Event storage", spiClass(cfg.spis().eventStorageSpi()))
-            spisT += ("Collision", spiClass(cfg.spis().collisionSpi()))
-            spisT += ("Authentication", spiClass(cfg.spis().authenticationSpi()))
-            spisT += ("Secure session", spiClass(cfg.spis().secureSessionSpi()))
-            spisT += ("Deployment", spiClass(cfg.spis().deploymentSpi()))
-            spisT += ("Checkpoints", spisClass(cfg.spis().checkpointSpis()))
-            spisT += ("Failovers", spisClass(cfg.spis().failoverSpis()))
-            spisT += ("Load balancings", spisClass(cfg.spis().loadBalancingSpis()))
-            spisT += ("Swap spaces", spiClass(cfg.spis().swapSpaceSpi()))
-
-            spisT.render()
-
-            println("\nPeer-to-Peer:")
-
-            val p2pT = VisorTextTable()
-
-            p2pT += ("Peer class loading enabled", bool2Str(cfg.p2p().p2pEnabled()))
-            p2pT += ("Missed resources cache size", cfg.p2p().p2pMissedResponseCacheSize())
-            p2pT += ("Peer-to-Peer loaded packages", safe(cfg.p2p().p2pLocalClassPathExclude(), DFLT))
-
-            p2pT.render()
-
-            println("\nEmail:")
-
-            val emailT = VisorTextTable()
-
-            emailT += ("SMTP host", safe(cfg.email().smtpHost(), DFLT))
-            emailT += ("SMTP port", safe(cfg.email().smtpPort(), DFLT))
-            emailT += ("SMTP username", safe(cfg.email().smtpUsername(), DFLT))
-            emailT += ("Admin emails", safe(cfg.email().adminEmails(), DFLT))
-            emailT += ("From email", safe(cfg.email().smtpFromEmail(), DFLT))
-            emailT += ("SMTP SSL enabled", bool2Str(cfg.email().smtpSsl()))
-            emailT += ("SMTP STARTTLS enabled", bool2Str(cfg.email().smtpStartTls()))
-
-            emailT.render()
-
-            println("\nLifecycle:")
-
-            val lifecycleT = VisorTextTable()
-
-            lifecycleT += ("Beans", safe(cfg.lifecycle().beans(), DFLT))
-            lifecycleT += ("Notifications", bool2Str(cfg.lifecycle().emailNotification()))
-
-            lifecycleT.render()
-
-            println("\nExecutor services:")
-
-            val execSvcT = VisorTextTable()
-
-            val execCfg = cfg.executeService()
-
-            execSvcT += ("Executor service", safe(execCfg.executeService(), DFLT))
-            execSvcT += ("Executor service shutdown", bool2Str(execCfg.executeServiceShutdown()))
-            execSvcT += ("System executor service", safe(execCfg.systemExecutorService(), DFLT))
-            execSvcT += ("System executor service shutdown", bool2Str(execCfg.systemExecutorServiceShutdown()))
-            execSvcT += ("Peer-to-Peer executor service", safe(execCfg.p2pExecutorService(), DFLT))
-            execSvcT += ("Peer-to-Peer executor service shutdown", bool2Str(execCfg.p2pExecutorServiceShutdown()))
-            execSvcT += ("REST Executor Service", safe(execCfg.restExecutorService(), DFLT))
-            execSvcT += ("REST Executor Service Shutdown", bool2Str(execCfg.restExecutorServiceShutdown()))
-
-            execSvcT.render()
-
-            println("\nSegmentation:")
-
-            val segT = VisorTextTable()
-
-            segT += ("Segmentation policy", safe(cfg.segmentation().policy(), DFLT))
-            segT += ("Segmentation resolvers", safe(cfg.segmentation().resolvers(), DFLT))
-            segT += ("Segmentation check frequency", cfg.segmentation().checkFrequency())
-            segT += ("Wait for segmentation on start", bool2Str(cfg.segmentation().waitOnStart()))
-            segT += ("All resolvers pass required", bool2Str(cfg.segmentation().passRequired()))
-
-            segT.render()
-
-            println("\nEvents:")
-
-            val evtsT = VisorTextTable()
-
-            val inclEvtTypes = Option(cfg.includeEventTypes()).fold(DFLT)(et => arr2Str(et.map(GridUtils.gridEventName)))
-
-            evtsT += ("Included event types", inclEvtTypes)
-
-            evtsT.render()
-
-            println("\nREST:")
-
-            val restT = VisorTextTable()
-
-            restT += ("REST enabled", bool2Str(cfg.rest().restEnabled()))
-            restT += ("Rest accessible folders", safe(cfg.rest().accessibleFolders(), DFLT))
-            restT += ("Jetty path", safe(cfg.rest().jettyPath(), DFLT))
-            restT += ("Jetty host", safe(cfg.rest().jettyHost(), DFLT))
-            restT += ("Jetty port", safe(cfg.rest().jettyPort(), DFLT))
-            restT += ("Tcp ssl enabled", bool2Str(cfg.rest().tcpSslEnabled()))
-            restT += ("Tcp ssl context factory", safe(cfg.rest().tcpSslContextFactory(), DFLT))
-            restT += ("Tcp host", safe(cfg.rest().tcpHost(), DFLT))
-            restT += ("Tcp port", safe(cfg.rest().tcpPort(), DFLT))
-
-            restT.render()
-
-            if (cfg.userAttributes().nonEmpty) {
-                println("\nUser attributes:")
-
-                val uaT = VisorTextTable()
-
-                uaT #= ("Name", "Value")
-
-                cfg.userAttributes().foreach(a => uaT += (a._1, a._2))
-
-                uaT.render()
-            } else
-                println("\nNo user attributes defined.")
-
-            if (cfg.env().nonEmpty) {
-                println("\nEnvironment variables:")
-
-                val envT = VisorTextTable()
-
-                envT.maxCellWidth = 80
-
-                envT #= ("Name", "Value")
-
-                cfg.env().foreach(v => envT += (v._1, compactProperty(v._1, v._2)))
-
-                envT.render()
-            } else
-                println("\nNo environment variables defined.")
-
-            val sysProps = cfg.systemProperties().toMap
-
-            if (sysProps.nonEmpty) {
-                println("\nSystem properties:")
-
-                val spT = VisorTextTable()
-
-                spT.maxCellWidth = 80
-
-                spT #= ("Name", "Value")
-
-                sysProps.foreach(p => spT += (p._1, compactProperty(p._1, p._2)))
-
-                spT.render()
-            } else
-                println("\nNo system properties defined.")
-
-            cfg.caches().foreach(cacheCfg => {
-                VisorCacheCommand.showCacheConfiguration("\nCache '" + safe(cacheCfg.name(), DFLT) + "':", cacheCfg)
-            })
-        }
-    }
-
-    /**
-     * Splits a string by path separator if it's longer than 100 characters.
-     *
-     * @param value String.
-     * @return List of strings.
-     */
-    def compactProperty(name: String, value: String): List[String] = {
-        val ps = getProperty("path.separator")
-
-        // Split all values having path separator into multiple
-        // lines (with few exceptions...).
-        val lst =
-            if (name != "path.separator" && value.indexOf(ps) != -1 && value.indexOf("http:") == -1 &&
-                value.length() > 80)
-                value.split(ps).toList
-            else
-                List(value)
-
-        // Replace whitespaces
-        lst.collect {
-            case v => v.replaceAll("\n", "<NL>").replaceAll("\r", "<CR>").replaceAll("\t", "<TAB>")
-        }
-    }
-}
-
-/**
- * Companion object that does initialization of the command.
- */
-object VisorConfigurationCommand {
-    addHelp(
-        name = "config",
-        shortInfo = "Prints node configuration.",
-        spec = List(
-            "config",
-            "config {-id=<node-id>|id8=<node-id8>}"
-        ),
-        args = List(
-            "-id=<node-id>" -> List(
-                "Full node ID. Either '-id8' or '-id' can be specified.",
-                "If neither is specified - command starts in interactive mode."
-            ),
-            "-id8=<node-id8>" -> List(
-                "Node ID8. Either '-id8' or '-id' can be specified.",
-                "If neither is specified - command starts in interactive mode.",
-                "Note you can also use '@n0' ... '@nn' variables as shortcut to <node-id>."
-            )
-        ),
-        examples = List(
-            "config -id8=12345678" ->
-                "Prints configuration for node with '12345678' id8.",
-            "config -id8=@n0" ->
-                "Prints configuration for node with id8 taken from '@n0' memory variable.",
-            "config" ->
-                "Starts command in interactive mode."
-        ),
-        ref = VisorConsoleCommand(cmd.config, cmd.config)
-    )
-
-    /** Singleton command. */
-    private val cmd = new VisorConfigurationCommand
-
-    /**
-     * Singleton.
-     */
-    def apply() = cmd
-
-    /**
-     * Implicit converter from visor to commands "pimp".
-     *
-     * @param vs Visor tagging trait.
-     */
-    implicit def fromConfig2Visor(vs: VisorTag): VisorConfigurationCommand = cmd
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e1c3c8ce/modules/visor-console/src/main/scala/org/gridgain/visor/commands/deploy/Packet.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/deploy/Packet.scala b/modules/visor-console/src/main/scala/org/gridgain/visor/commands/deploy/Packet.scala
deleted file mode 100644
index 8c30653..0000000
--- a/modules/visor-console/src/main/scala/org/gridgain/visor/commands/deploy/Packet.scala
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gridgain.visor.commands
-
-/**
- * ==Overview==
- * Visor 'deploy' command implementation.
- *
- * ==Help==
- * {{{
- * +---------------------------------------------------+
- * | deploy | Copies file or directory to remote host. |
- * |        | Command relies on SFTP protocol.         |
- * +---------------------------------------------------+
- * }}}
- *
- * ====Specification====
- * {{{
- *     deploy "-h={<username>{:<password>}@}<host>{:<port>} {-u=<username>}
- *         {-p=<password>} {-k=<path>} -s=<path> {-d<path>}"
- * }}}
- *
- * ====Arguments====
- * {{{
- *     -h={<username>{:<password>}@}<host>{:<port>}
- *         Host specification.
- *
- *         <host> can be a hostname, IP or range of IPs.
- *         Example of range is 192.168.1.100~150,
- *         which means all IPs from 192.168.1.100 to 192.168.1.150 inclusively.
- *
- *         Default port number is 22.
- *
- *         This option can be provided multiple times.
- *     -u=<username>
- *         Default username.
- *         Used if specification doesn't contain username.
- *         If default is not provided as well, current local username will be used.
- *     -p=<password>
- *         Default password.
- *         Used if specification doesn't contain password.
- *         If default is not provided as well, it will be asked interactively.
- *     -k=<path>
- *         Path to private key file.
- *         If provided, it will be used for all specifications that doesn't contain password.
- *     -s=<path>
- *         Source path.
- *     -d=<path>
- *         Destination path (relative to GRIDGAIN_HOME).
- *         If not provided, files will be copied to the root of GRIDGAIN_HOME.
- * }}}
- *
- * ====Examples====
- * {{{
- *     deploy "-h=uname:passwd@host -s=/local/path -d=/remote/path"
- *         Copies file or directory to remote host (password authentication).
- *     deploy "-h=uname@host -k=ssh-key.pem -s=/local/path -d=/remote/path"
- *         Copies file or directory to remote host (private key authentication).
- * }}}
- */
-package object deploy


Mime
View raw message