The Resource Manager can be launched or stopped from either the command line or the Marathon UI.
Launching from the Command Line
To start the Resource Manager, run the YARN daemon from the command line:
yarn-daemon.sh start resourcemanager
To shut down he Resource Manager, run the YARN daemon from the command line:
yarn-daemon.sh stop resourcemanager
Launching from Marathon
Alternatively, start and stop Myriad from the Marathon UI. See Marathon: Application Basics for more information. For example, create an application to start the Resource Manager:
cd hadoop-2.7.1/sbin && yarn-daemon.sh start resourcemanager
Alternatively, when launching the Resource Manager in an HA environment, specify the yarn.resourcemanager.hostname
property. The hostname is the ID field specified when launching a Marathon application.
To Start the Resource Manager from Marathon:
Launch Marathon with <host>:8080. For example: http://10.10.100.16:8080
Click on New App.
Create a new application for the resource manager and specify:
ID
CPU
Memory
Instances
Command.
For example
Parameter | Example Value |
---|---|
ID | rm |
CPU | 0.2 |
Memory | 2048 |
Instances | 1 |
Command | env && && yarn resourcemanager |
If the yarn.resourcemanager.hostname property is not specified in the yarn-site.xml file, then the -DYARN_RESOURCEMANAGER_OPTS option must be specified.
For example
env && export YARN_RESOURCEMANAGER_OPTS=-Dyarn.resourcemanager.hostname=rm.marathon.mesos && yarn resourcemanager
Some applications might require the yarn.resourcemanager.hostname
property to be explicitly specified as a command line option.