如何重启 Apache Apex 应用程序?

How to restart Apache Apex application?

apex documentation 可以清楚地看出,使用 apache apex 启动的应用程序可以分别使用以下命令终止或关闭:kill-appshutdown-app

但是,当应用程序关闭时 (shutdown/kill),如何从之前的状态重新启动它?

Apache Apex 提供命令行界面“apex”(以前称为“dtcli”)脚本,用于与应用程序交互。应用程序关闭或终止后,您可以使用以下命令重新启动它:

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

其中,

-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

请注意,-Ddt.attr.APPLICATION_NAME-exactMatch 是可选的。