Skip to main content

About AMPS spark CLI

60East provides the AMPS spark CLI as a command line interface to interacting with an AMPS server. AMPS spark CLI provides many of the capabilities of the AMPS client libraries through this interface. The utility lets you execute AMPS commands from the command line. AMPS spark CLI is a Java application, and requires Java runtime environment version 8 or later on the system.

AMPS spark CLI is most commonly used for ad hoc testing or simple maintenance tasks. For more complicated tasks or more sophisticated maintenance, 60East recommends using one of the client libraries (such as the AMPS Python Client for admin scripting).

To test AMPS spark CLI with the sample configuration, run the following command:

%> $SPARKDIR/bin/spark ping -server localhost:9007 -type json

This command tests connectivity to the AMPS server running at port 9007 on the local system. It confirms that the server is listening on that port using the default protocol for AMPS and accepts JSON messages on that port. The command should produce output like the following:

Successfully connected to tcp://username@localhost:9007/amps/json
info

It's important to keep in mind that AMPS spark CLI provides basic functionality -- operations that don't require any particular application logic or special handling. Some features of AMPS (for example, setting certain headers on messages published to AMPS) are only available through the AMPS client libraries.

Prerequisites​

The AMPS spark CLI requires a Java Virtual Machine for Java 8 or later.

The AMPS server installation is not required to install AMPS spark CLI itself. The distribution includes a distribution of the AMPS Java Client for use by AMPS spark CLI: it does not need to be separately downloaded.