Starts, stops, or restarts services on one or more server nodes. Permissions
required: ss, fc or a.
To start or stop services, you must specify the service name, the action (start, stop, or restart), and the nodes on which to perform the action. You can specify the nodes in one of two ways:
nodes parameter to specify a space-delimited list of node
names.filter parameter to specify all nodes that match a certain
pattern. See Filters for more information./opt/mapr/bin/maprcli node services
[ -action start|stop|restart|enable|disable ]
[ -apiserver start|stop|restart|enable|disable ]
[ -cldb start|stop|restart|enable|disable ]
[ -cluster <cluster> ]
[ -fileserver start|stop|restart|enable|disable ]
[ -filter <filter> ]
[ -name <service> ]
[ -nfs start|stop|restart|enable|disable ]
[ -nfs4 start|stop|restart|enable|disable ]
[ -nodes <node names> ]
[ -zkconnect <ZooKeeper Connect String> ]
| Request Type | POST |
| Request URL | |
To perform an action on a service, on a particular set of nodes, you must specify the following three parameters:
action- the action to perform:node or filter - the nodes on which to perform the
action; either a list of nodes, or a filter that matches a set of nodesname - the service on which to perform the actionThe following table lists the parameters available with the node
services command.
|
Parameter |
Description |
|---|---|
action |
An action to perform on a service specified in the name
parameter: Values: start, stop, suspend, resume, restart, enable, or disable |
apiserver |
Starts, stops, or restarts the apiserver. Values: start, stop, restart, enable, or disable |
cldb |
Starts, stops, or restarts the cldb service. Values: start, stop, suspend, resume, restart, enable, or disable |
cluster |
The cluster on which to run the command. |
fileserver |
Starts, stops, or restarts the fileserver service. Values: start, stop, suspend, resume, restart, enable, or disable |
filter |
A filter specifying nodes on which to start or stop services. For fields
to use with the filter, see the node table. See Filters for more information about
filters. Note: You must specify either the
filter parameter
or the nodes parameter. |
name |
A service on which to perform an action specified by the
action parameter. Any service can be specified with this
option, but the following services can be specified only with the
name option: collectd,
elasticsearch, fluentd,
grafana, historyserver,
hivemeta, hoststats,
hs2, httpfs, hue,
kibana, nodemanager,
opentsdb, oozie, and
resourcemanager.
|
nfs |
Starts, stops, or restarts the nfs service. Values: start, stop, suspend, resume, restart, enable, or disable |
nfs4 |
Starts, stops, or restarts the NFSv4 service. Values: start, stop, restart, enable, or disable |
nodes |
A list of node names, separated by spaces. Note: Either
this or
filter is required. |
zkconnect |
The ZooKeeper Connect String. |
Start the NodeManager Service
/opt/mapr/bin/maprcli node services -name nodemanager -nodes abc.sj.us -action startStop the ResourceManager Service
/opt/mapr/bin/maprcli node services -name resourcemanager -nodes abc.sj.us -action stopStop the ResourceManager Service
/opt/mapr/bin/maprcli node services -name resourcemanager -nodes abc.sj.us -action restartRestart NFS server
/opt/mapr/bin/maprcli node services -nodes abc.sj.us -nfs restartRestart NFS server using a filter
Using a filter is common, especially in HBase environments, where full restarts of region and master servers are needed.
/opt/mapr/bin/maprcli node services -filter ["csvc==nfs"] -nfs restart
Start the Hue Service
/opt/mapr/bin/maprcli node services -name hue -action start -nodes <node n>Restart the hoststats service
Restart the hoststats service after making changes to the HPE Ezmeral Data Fabric Metrics database. You do not need to restart warden.
/opt/mapr/bin/maprcli node services -name hoststats -action restart -nodes <nodes>
OR
/opt/mapr/bin/maprcli node services -name hoststats -action restart -filter '[csvc==hoststats]'