org.gridgain.visor

visor

object visor extends VisorTag

___    _________________________ ________
__ |  / /____  _/__  ___/__  __ \___  __ \
__ | / /  __  /  _____ \ _  / / /__  /_/ /
__ |/ /  __/ /   ____/ / / /_/ / _  _, _/
_____/   /___/   /____/  \____/  /_/ |_|

Overview

Visor console provides monitoring capabilities for GridGain.

Usage

GridGain ships with GRIDGAIN_HOME/bin/ggvisorcmd.{sh|bat} script that starts Visor console.

Just type:<ex>help</ex> in Visor console to get help and get started.

Annotations
@GridNotPeerDeployable()
Linear Supertypes
VisorTag, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. visor
  2. VisorTag
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type Arg = (String, String)

    Argument type.

  2. type ArgList = Seq[Arg]

    Type alias for command argument list.

  3. type EventFilter = (GridEvent) ⇒ Boolean

    Type alias for general event filter.

  4. type NodeFilter = (GridNode) ⇒ Boolean

    Type alias for general node filter.

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. final val ALL_NODES_FILTER: (GridNode) ⇒ Boolean

    Node filter that includes any node.

  5. final val NL: String

    System line separator.

  6. val Til: Arg

    Nil is for empty list, Til is for empty tuple.

  7. def addCloseCallback(f: () ⇒ Unit): Unit

    Adds close callback.

    Adds close callback. Added function will be called every time command close is called.

    f

    Close callback to add.

  8. def addHelp(name: String, shortInfo: String, longInfo: Seq[String] = null, aliases: Seq[String] = Seq.empty, spec: Seq[String], args: Seq[(String, AnyRef)] = null, examples: Seq[(String, AnyRef)], ref: VisorConsoleCommand): Unit

    Adds command help to the Visor console.

    Adds command help to the Visor console. This will be printed as part of help command.

    name

    Command name.

    shortInfo

    Short command description.

    longInfo

    Optional multi-line long command description. If not provided - short description will be used instead.

    aliases

    List of aliases. Optional.

    spec

    Command specification.

    args

    List of (host, description) tuples for command arguments. Optional.

    examples

    List of (example, description) tuples for command examples.

    ref

    - command implementation.

  9. def addShutdownCallback(f: () ⇒ Unit): Unit

    Adds close callback.

    Adds close callback. Added function will be called every time command close is called.

    f

    Close callback to add.

  10. def adviseToConnect(): Unit

    Prints standard 'not connected' error message.

  11. def apply(): Unit

    Prints out status and help in case someone calls visor().

  12. def argName(t: (String, String)): String

    Helper function that makes up the full argument host from tuple.

    Helper function that makes up the full argument host from tuple.

    t

    Command argument tuple.

  13. def argValue(n: String, args: ArgList): Option[String]

    Gets the value for a given argument host.

    Gets the value for a given argument host.

    n

    Argument host.

    args

    Argument list.

    returns

    Argument value.

    Annotations
    @Nullable()
  14. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  15. def ask(prompt: String, dflt: String, passwd: Boolean = false): String

    Asks user input.

    Asks user input.

    prompt

    Prompt string.

    dflt

    Default value for user input.

    passwd

    If true, input will be masked with '*' character. false by default.

  16. def askConfigFile(): Option[String]

    Asks user to choose configuration file.

    Asks user to choose configuration file.

    returns

    Option for file path.

  17. def askForHost(title: String): Option[GridProjection]

    Asks user to select a host from the list.

    Asks user to select a host from the list.

    title

    Title displayed before the list of hosts.

    returns

    Option for projection of nodes located on selected host.

  18. def askForNode(title: String): Option[UUID]

    Asks user to select a node from the list.

    Asks user to select a node from the list.

    title

    Title displayed before the list of nodes.

    returns

    Option for ID of selected node.

  19. def askNodeId(): Option[String]

    Asks user to choose node id8.

    Asks user to choose node id8.

    returns

    Option for node id8.

  20. var cfgPath: String

    Configuration file path, if any.

  21. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. def close(): Unit

    Disconnects visor.

    Command

    Disconnects visor.

    Examples

    <ex>close</ex> Disconnects from the grid.

  23. lazy val commands: Seq[String]

  24. def connectTimestamp: Long

    Gets timestamp of Visor console connection.

    Gets timestamp of Visor console connection. Returns 0 if Visor console is not connected.

    returns

    Timestamp of Visor console connection.

  25. def emptyTaskArgument[A](nids: Iterable[UUID]): GridBiTuple[Set[UUID], Void]

  26. def emptyTaskArgument[A](nid: UUID): GridBiTuple[Set[UUID], Void]

    Convert to task argument.

  27. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  28. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  29. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  30. def formatDate(date: Date): String

    Returns string representation of the date provided.

    Returns string representation of the date provided. Result formatted using pattern MM/dd/yy.

    date

    Date.

  31. def formatDate(ts: Long): String

    Returns string representation of the timestamp provided.

    Returns string representation of the timestamp provided. Result formatted using pattern MM/dd/yy.

    ts

    Timestamp.

  32. def formatDateTime(date: Date): String

    Returns string representation of the date provided.

    Returns string representation of the date provided. Result formatted using pattern MM/dd/yy, HH:mm:ss.

    date

    Date.

  33. def formatDateTime(ts: Long): String

    Returns string representation of the timestamp provided.

    Returns string representation of the timestamp provided. Result formatted using pattern MM/dd/yy, HH:mm:ss.

    ts

    Timestamp.

  34. def formatDouble(d: Double): String

    Formats double value with #0.00 formatter.

    Formats double value with #0.00 formatter.

    d

    Double value to format.

  35. def formatInt(d: Double): String

    Formats double value with #0 formatter.

    Formats double value with #0 formatter.

    d

    Double value to format.

  36. def formatMemory(n: Long): String

    Returns string representation of the memory.

    Returns string representation of the memory.

    n

    Memory size.

  37. def formatMemoryLimit(n: Long): String

    Returns string representation of the memory limit.

    Returns string representation of the memory limit.

    n

    Memory size.

  38. def formatNumber(n: Long): String

    Returns string representation of the number.

    Returns string representation of the number.

    n

    Number.

  39. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  40. def getVariable(v: String): String

    Try get variable value with given name.

    Try get variable value with given name.

    v

    variable name.

    returns

    variable value or v if variable with name v not exist.

  41. var grid: GridEx

  42. def gridOpt: Option[GridEx]

    Gets global projection as an option.

  43. def hasArgFlag(n: String, args: ArgList): Boolean

    Shortcut method that checks if flag (non-null host and null value) is set in the argument list.

    Shortcut method that checks if flag (non-null host and null value) is set in the argument list.

    n

    Name of the flag.

    args

    Command argument list.

  44. def hasArgName(n: String, args: ArgList): Boolean

    Shortcut method that checks if passed in argument list has an argument with given host.

    Shortcut method that checks if passed in argument list has an argument with given host.

    n

    Argument host to check for existence in this list.

    args

    Command argument list.

  45. def hasArgValue(v: String, args: ArgList): Boolean

    Shortcut method that checks if passed in argument list has an argument with given value.

    Shortcut method that checks if passed in argument list has an argument with given value.

    v

    Argument value to check for existence in this list.

    args

    Command argument list.

  46. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  47. def help(): Unit

    Prints generic help.

    Command

    Prints generic help.

    Example

    <ex>help</ex> Prints help.

  48. def help(args: String = null): Unit

    Prints help for specific command(s) or for all commands.

    Command

    Prints help for specific command(s) or for all commands.

    Example

    <ex>help</ex> Prints general help.

    <ex>help open</ex> Prints help for 'open' command.

    args

    List of commands to print help for. If empty - prints generic help.

  49. def isConnected: Boolean

    Tests whether or not Visor console is connected.

    Tests whether or not Visor console is connected.

    returns

    True if Visor console is connected.

  50. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  51. def log(args: String): Unit

    Starts or stops logging.

    Command

    Starts or stops logging.

    Examples

    <ex>log -l -f=/home/user/visor-log</ex> Starts logging to file visor-log located at /home/user.
    <ex>log -l -f=log/visor-log</ex> Starts logging to file visor-log located at &ltGridGain home folder&gt/log.
    <ex>log -l -p=20</ex> Starts logging with querying events period of 20 seconds.
    <ex>log -l -t=30</ex> Starts logging with topology snapshot logging period of 30 seconds.
    <ex>log -s</ex> Stops logging.

    args

    Command arguments.

  52. def log(): Unit

    Prints log status.

    Command

    Prints log status.

    Examples

    <ex>log</ex> Prints log status.

  53. def logText(msg: String): Unit

    Logs text message.

    Logs text message.

    msg

    Message to log.

  54. def makeArg(arg: Arg): String

    Reconstructs string presentation for given argument.

    Reconstructs string presentation for given argument.

    arg

    Argument to reconstruct.

    Annotations
    @Nullable()
  55. def makeArgs(args: ArgList): String

    Reconstructs string presentation for given argument list.

    Reconstructs string presentation for given argument list.

    args

    Argument list to reconstruct.

  56. def makeExpression(s: String): Option[(Long) ⇒ Boolean]

    Parses string containing mnemonic predicate and returns Scala predicate.

    Parses string containing mnemonic predicate and returns Scala predicate.

    s

    Mnemonic predicate.

    returns

    Long to Boolean predicate or null if predicate cannot be created.

  57. def mclear(): Unit

    Clears all Visor console memory.

  58. def mclear(arg: String): Unit

    Clears given Visor console variable or the whole namespace.

    Clears given Visor console variable or the whole namespace.

    arg

    Variable host or namespace mnemonic.

  59. def mfind(v: String): Option[(String, String)]

    Finds variable by its value.

    Finds variable by its value.

    v

    Value to find by.

  60. def mget(): Unit

    Trap for missing arguments.

  61. def mget(n: String): Unit

    Gets Visor console memory variable.

    Command

    Gets Visor console memory variable. Note that this method does not perform variable substitution on its parameters.

    Examples

    <ex>mget @a</ex> Gets the value for Visor console variable '@a'.

    n

    Name of the variable.

    returns

    Variable value or null if such variable doesn't exist or its value was set as null.

  62. def mgetOpt(n: String): Option[String]

    Gets Visor console memory variable.

    Command

    Gets Visor console memory variable. Note that this method does not perform variable substitution on its parameters.

    Examples

    <ex>mgetOpt a</ex> Gets the value as an option for Visor console variable 'a'.

    n

    Name of the variable.

    returns

    Variable host as an option.

  63. def mlist(): Unit

    Lists all Visor console memory.

    Command

    Lists all Visor console memory.

    Examples

    <ex>mlist</ex> Lists all variables in Visor console memory.

  64. def mlist(arg: String): Unit

    Lists Visor console memory variables.

    Command

    Lists Visor console memory variables.

    Examples

    <ex>mlist ac</ex> Lists variables that start with a or c from Visor console memory.

    <ex>mlist</ex> Lists all variables from Visor console memory.

    arg

    String that contains start characters of listed variables. If empty - all variables will be listed.

  65. def mset(n: String, v: String): String

    Sets Visor console memory variable.

    Sets Visor console memory variable. Note that this method does not perform variable substitution on its parameters.

    n

    Name of the variable. Can't be null.

    v

    Value of the variable. Can't be null.

    returns

    Previous value.

  66. def msetOpt(n: String, v: String): Option[String]

    Sets Visor console memory variable.

    Sets Visor console memory variable. Note that this method does not perform variable substitution on its parameters.

    n

    Name of the variable. Can't be null.

    v

    Value of the variable. Can't be null.

    returns

    Previous value as an option.

  67. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  68. def nid8(nid: UUID): String

    Transform node ID to ID8 string.

    Transform node ID to ID8 string.

    nid

    Node ID.

    returns

    Node ID in ID8 format.

  69. def nid8(node: GridNode): String

    Transform node ID to ID8 string.

    Transform node ID to ID8 string.

    node

    Node to take ID from.

    returns

    Node ID in ID8 format.

  70. def nl(): Unit

    Shortcut for println().

  71. def node(nid: UUID): GridNode

    Get grid node for specified ID.

    Get grid node for specified ID.

    nid

    Node ID.

    returns

    GridNode instance.

    Exceptions thrown
    GridException

    if Visor is disconnected or node not found.

  72. def nodeById8(id8: String): Iterable[GridNode]

    Get node by ID8 string.

    Get node by ID8 string.

    id8

    Node ID in ID8 format.

    returns

    Collection of nodes that has specified ID8.

  73. def nodeId8(id: UUID): String

    Returns string with node id8 and its memory variable, if available.

    Returns string with node id8 and its memory variable, if available.

    id

    Node ID.

    returns

    String.

  74. def nodeId8Addr(id: UUID): String

    Returns string with node id8, its memory variable, if available, and its IP address (first internal address), if node is alive.

    Returns string with node id8, its memory variable, if available, and its IP address (first internal address), if node is alive.

    id

    Node ID.

    returns

    String.

  75. def noop(): Unit

  76. final def notify(): Unit

    Definition Classes
    AnyRef
  77. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  78. def open(): Unit

    Connects Visor console to the default grid.

    Command

    Connects Visor console to the default grid.

    Example

    <ex>open</ex> Connects to the default grid.

  79. def open(cfg: GridConfiguration, cfgPath: String): Unit

    Connects Visor console to configuration with path.

    Connects Visor console to configuration with path.

    cfg

    Configuration.

    cfgPath

    Configuration path.

  80. def open(args: String): Unit

    Connects Visor console to default or named grid.

    Command

    Connects Visor console to default or named grid.

    Examples

    <ex>open -g=mygrid</ex> Connects to 'mygrid' grid.

    args

    Command arguments.

  81. def parseArgs(args: String): ArgList

    Utility method that parses command arguments.

    Utility method that parses command arguments. Arguments represented as a string into argument list represented as list of tuples (host, value) performing variable substitution:

    -p=@n - A named parameter where @n will be considered as a reference to variable named n. @ n - An unnamed parameter where @n will be considered as a reference to variable named n. -p - A flag doesn't support variable substitution.

    Note that recursive substitution isn't supported. If specified variable isn't set - the value starting with @ will be used as-is.

    args

    Command arguments to parse.

  82. def parseNode(argLst: ArgList): Product with Serializable with Either[String, Option[GridNode]]

    Extract node from command arguments.

    Extract node from command arguments.

    argLst

    Command arguments.

    returns

    error message or node ref.

  83. var pool: ExecutorService

    Internal thread pool.

  84. def quit(): Unit

    quit from Visor console.

    Command

    quit from Visor console.

    Examples

    <ex>quit</ex> Quit from Visor console.

  85. def removeCloseCallback(f: () ⇒ Unit): Unit

    Removes close callback.

    Removes close callback.

    f

    Close callback to remove.

  86. def removeCloseCallbacks(): Unit

    Removes all close callbacks.

  87. def safe(a: Any, dflt: Any = ""): String

    Gets a non-null value for given parameter.

    Gets a non-null value for given parameter.

    a

    Parameter.

    dflt

    Value to return if a is null.

  88. def safePercent(v: Double): String

    Guards against invalid percent readings.

    Guards against invalid percent readings.

    v

    Value in '%' to guard. Any value below 0 and greater than 100 will return n/a string.

  89. def searchCmd(cmd: String): Option[VisorConsoleCommandHolder]

  90. def setVar(v: AnyRef, prefix: String): String

    Creates a new variable with given value and returns its host.

    Creates a new variable with given value and returns its host.

    v

    Value.

    prefix

    Variable host prefix.

    returns

    New variable host.

  91. def setVarIfAbsent(v: AnyRef, prefix: String): String

    If variable with given value and prefix doesn't exist - creates a new variable with given value and returns its host.

    If variable with given value and prefix doesn't exist - creates a new variable with given value and returns its host. Otherwise, returns an existing variable host.

    v

    Value.

    prefix

    Variable host prefix.

    returns

    Existing variable host or the new variable host.

  92. def status(): Unit

    Prints Visor console status (with ASCII logo).

    Command

    Prints Visor console status (with ASCII logo).

    Example

    <ex>status</ex> Prints Visor console status.

  93. def status(args: String): Unit

    Prints Visor console status.

    Command

    Prints Visor console status.

    Example

    <ex>status -q</ex> Prints Visor console status without ASCII logo.

    args

    Optional "-q" flag to disable ASCII logo printout.

  94. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  95. def timeFilter(timeArg: Option[String]): Long

    Decode time frame from string.

    Decode time frame from string.

    timeArg

    Optional time frame: <num>s|m|h|d

    returns

    Time in milliseconds.

  96. implicit def toReturnable(v: Any): AnyRef { def ^^: Unit }

    Introduction of ^^ operator for Any type that will call break.

    Introduction of ^^ operator for Any type that will call break.

    v

    Any value.

  97. def toString(): String

    Definition Classes
    AnyRef → Any
  98. def toTaskArgument[A](nids: Iterable[UUID], arg: A): GridBiTuple[Set[UUID], A]

    Convert to task argument.

  99. def toTaskArgument[A](nid: UUID, arg: A): GridBiTuple[Set[UUID], A]

    Convert to task argument.

  100. def uptime: Long

    Gets visor uptime.

  101. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  102. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  103. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  104. def warn(errMsgs: Any*): Unit

    Prints properly formatted error message like:

    Prints properly formatted error message like:

    <visor>: err: error message
    errMsgs

    Error messages to print. If null - this function is no-op.

Inherited from VisorTag

Inherited from AnyRef

Inherited from Any

Ungrouped