Manage the Application Lifecycle
Once started, applications can be stopped, restarted, destroyed, and flexed as follows:
stop <name> [--force] [--wait time] [--message text]
Stops the application instance. The running application is stopped. Its settings are retained in HDFS.
The --wait
argument can specify a time in seconds to wait for the application instance to be stopped.
The --force
flag causes YARN asked directly to terminate the application instance. The --message
argument supplies an optional text message to be used in the request: this will appear in the application's diagnostics in the YARN RM UI.
If an unknown (or already stopped) application instance is named, no error is returned.
Example:
/usr/hdp/current/slider-client/bin/./slider stop app1
start <name> [--wait milliseconds] [--out <filename>] Start a stopped application instance, recreating it from its previously saved state.
After the application is launched, if an --out
argument specified a file, the "YARN application report" will be saved as a .json document into the file specified.
Example
/usr/hdp/current/slider-client/bin/./slider start app1
destroy <name> Destroy a (stopped) application instance. Important: This deletes all persistent data.
Example:
/usr/hdp/current/slider-client/bin/./slider destroy app1
flex <name> [--component component count]* Flex the number of workers in an application instance to the new value. If greater than before, new copies of the component will be requested. If less, component instances will be destroyed.
This operation has a return value of 0 if the change was submitted. Changes are not immediate and depend on the availability of resources in the YARN cluster
It returns -1 if there is no running application instance.
Examples:
slider flex app1 --component worker 8 --filesystem hdfs://<host>:<port> slider flex app1 --component master 2 --filesystem hdfs://<host>:<port>
For more information on Slider CLI commands, see the Apache Slider documentation.
You can use the Slider help
command to display a list of available commands.
[root@node-1 /]# /usr/hdp/current/slider-client/bin/./slider help 2014-10-31 09:20:10,852 [main] INFO client.SliderClient - Usage: slider COMMAND [options] where COMMAND is one of am-suicide Tell the Slider Application Master to simulate a process failure by terminating itself build Build a Slider cluster specification -but do not start it create Create a live Slider application update Update template for a Slider application destroy Destroy a frozen Slider application) diagnostics Diagnose the configuration of the running slider application and slider client exists Probe for an application running flex Flex a Slider application stop Stop a running application help Print help information install-package Install the application package in the home directory under sub-folder packages install-keytab Install the Kerberos keytab file in the sub-folder 'keytabs' of the user's Slider base directory kill-container Kill a container in the application list List running Slider applications registry Query the registry of a YARN application resolve Query the registry of a YARN application status Get the status of an application start Start a stopped application version Print the Slider version information Most commands print help when invoked without parameters 2014-10-31 09:20:10,856 [main] INFO util.ExitUtil - Exiting with status 0
Most commands display Help when invoked without parameters, similar to the usage statement shown below:
[root@node-1 /]# slider status 2014-10-31 09:45:11,817 [main] ERROR main.ServiceLauncher - org.apache. slider.core.exceptions.BadCommandArgumentsException: Not enough arguments for action: status Expected minimum 1 but got 0 Usage: slider status <application> --manager <manager> Binding (usually hostname:port) of the YARN resource manager (optional) --basepath <basePath> Slider base path on the filesystem (optional) --filesystem <filesystemBinding> Filesystem Binding (optional) -D <definitions> Definitions (optional) --debug Debug mode (optional) -S <sysprops> System properties in the form name value These are set after the JVM is started. (optional) --out <output> Output file for the configuration data (optional) 2014-10-31 09:45:11,826 [main] INFO util.ExitUtil - Exiting with status 40 [root@node-1 /]#