spark ping
The AMPS spark CLI ping command is used to connect to the AMPS instance and attempt to logon. This tool is useful to determine if an AMPS instance is running and responsive.
Common Options - spark ping
| Option | Definition |
|---|---|
| AMPS server to connect to. |
proto | Protocol to use. In this release, AMPS spark CLI supports Defaults to |
| Specifies whether to use an SSL-secured connection ( Values: Default: |
uriopts | Custom connection URI parameters to be passed in the URI query string. For example: |
| Allows a custom URI scheme to be specified. When both |
Examples
%> ./spark ping -server localhost:9007 -type json
Successfully connected to tcp://user@localhost:9007/amps/json
In the example above, AMPS spark CLI was able to successfully log onto the AMPS instance that was located on port 9007.
%> ./spark ping -server localhost:9119
Unable to connect to AMPS
(com.crankuptheamps.client.exception.ConnectionRefusedException: Unable to
connect to AMPS at localhost:9119).
In the example above, AMPS spark CLI was not able to successfully log onto the AMPS instance that was located on port 9119. The error shows the exception thrown by AMPS spark CLI, which in this case was a ConnectionRefusedException from Java.
For the full range of options, run spark help ping. See AMPS spark CLI Authentication and AMPS spark CLI Support for TCPS for shared connection settings.