You have developed your first Apache Apex application, perhaps written
integration tests that succeed in your IDE in embedded mode and are now ready to take the
application for a spin on the cluster? Maybe you have an Apache Hadoop YARN cluster on Amazon EMR,
Google Cloud Dataproc or another environment and would like to use it for this purpose?
In order to launch Apex applications on YARN, an Apex client is required. Apache Apex comes with
the Apex CLI, a command line tool that can be used to launch and manage running applications.
The official Apache Apex releases provide the source code, but no binary distribution.
If you don’t want to (or cannot!) compile the source code to make the CLI available on your cluster,
then you can obtain pre-built binaries for the releases from here
(some other download options are available here).
Type help to get a list of commands (or see documentation for more information).
The YARN services provide some information about containers and logs,
but YARN is agnostic to the application framework and not sufficient to gain detailed visibility into the execution.
For example, we may want to look at containers to see if they execute as expected with list-containers:
Status of the container and frequently changing container IDs may be an indicator that something is wrong and a
reason to look into the log files. For each container we can also see the operators that are deployed in it,
more information about operators can be obtained using the list-operators command (in this case with filtering of the response):
Various metrics provide an insight into the execution of individual operators. The currentWindowId should progress continuously and the tuple count metrics provide an indication of how much data was processed (if the operator was a source, then emitted tuples may reflect how many elements were consumed). If an application “does not work”, it is typically best to start analysis with the input operators and work from there downstream.
The Apex CLI is performing its operations by talking to the YARN resource manager and to the Apex application master through a REST API. It is possible to write other tools against that same application master REST API for custom monitoring and diagnostics. It is also possible to provide operator specific metrics which will be available in the operator details along with the system metrics.