How to restart Apache Apex application?

Question!

From the apex documentation, it is clear that an app launched with apache apex can be killed or shutdwon using the commands: kill-app & shutdown-app respectively.

But, when the application is turned off (shutdown/kill), how to restart it from its previous state?

By : daemon12


Answers
Apache Apex provides a command line interface, "apex" (previously called "dtcli") script, to interact with the applications. Once an application is shut down or killed, you can restart it using following command:

launch pi-demo-3.4.0-incubating-SNAPSHOT.apa -originalAppId application_1465560538823_0074 -Ddt.attr.APPLICATION_NAME="Relaunched PiDemo" -exactMatch "PiDemo"

where,

-originalAppId is ID of the original app. This will ensure that the operators continue from where the original app left-off.

-Ddt.attr.APPLICATION_NAME gives the new name for relaunched app

-exactMatch is used to specify the exact app name

Note that, -Ddt.attr.APPLICATION_NAME & -exactMatch are optional.

By : daemon12


This video can help you solving your question :)
By: admin