Lists nodes in the cluster.

You can specify a set of nodes for which to retrieve information in several ways:

  • To list only nodes with raised alarms, set alarmednodes to 1.
  • To list only NFS nodes, set nfsnodes to 1.
  • To window the list, use the start and limit options to select only a portion of the results.
  • To list nodes that match certain criteria, pass a filter to the filter parameter. See the Fields table on the node page for the fields available to filter. See the maprcli and REST API Syntax page for information on filters.

Syntax

CLI

maprcli node list
    [ -alarmednodes 1 ]
    [ -cluster <cluster ]
    [ -columns <columns>]
    [ -filter <filter> ]
    [ -limit <limit> ]
    [ -nfsnodes 1 ]
    [ -output terse|verbose ]
    [ -start <offset> ]
    [ -zkconnect <ZooKeeper Connect String> ]

REST

http[s]://<host>:<port>/rest/node/list?<parameters> 

Parameters



Parameter

Description

alarmednodes

If set to 1, displays only nodes with raised alarms. Cannot be used if nfsnodes is set.

cluster

The cluster on which to run the command.

columns

A comma-separated list of fields to return in the query, specified by the short names. Note: When specifying this option, the ip and hostname columns are always returned in the query.

filter

A filter specifying nodes on which to start or stop services. See the Fields table on the node page for the fields available to filter. See the maprcli and REST API Syntax page for information on filters.

limit

The number of rows to return, beginning at start. Default: 0

nfsnodes

If set to 1, displays only nodes running NFS. Cannot be used if alarmednodes is set.

output

Specifies whether the output should be terse or verbose.

start

The offset from the starting row according to sort. Default: 0

zkconnect

ZooKeeper Connect String


Output


Information about the nodes.See the Fields table below.

Sample Output

# maprcli node list -limit 1 -json
{
    "timestamp":1433457374034,
    "timeofday":"2015-06-04 10:36:14.034 GMT+0000",
    "status":"OK",
    "total":4,
    "data":[
        {
            "id":"8180539710771034587",
            "ip":"10.10.82.22",
            "hostname":"centos22.lab",
            "racktopo":"/data/default-rack/centos22.lab",
            "health":0,
            "healthDesc":"Healthy",
            "service":"webserver,cldb,drill-bits,fileserver,hoststats",
            "configuredservice":"webserver,cldb,drill-bits,fileserver,hoststats",
            "fs-heartbeat":0,
            "jt-heartbeat":2,
            "dtotal":91,
            "dused":0,
            "davail":90,
            "rpcs":0,
            "rpcin":140,
            "rpcout":322,
            "disks":3,
            "MapRfs disks":1,
            "faileddisks":0,
            "dreads":0,
            "dreadK":0,
            "dwrites":5,
            "dwriteK":28,
            "cpus":1,
            "utilization":4,
            "uptime":"Sat Jan 17 13:14:52 UTC 1970",
            "mtotal":7873,
            "mused":4296,
            "ttmapSlots":0,
            "ttmapUsed":0,
            "ttReduceSlots":0,
            "ttReduceUsed":0,
            "bytesReceived":204,
            "bytesSent":454,
            "numResyncSlots":16,
            "blockMovesOut":false,
            "blockMovesIn":false,
            "maxContainersThreshold":50000,
            "numPutsInLastTenSeconds":0,
            "numPutsInLastMinute":0,
            "numPutsInLastFiveMinutes":0,
            "numPutsInLastFifteenMinutes":0,
            "numGetsInLastTenSeconds":0,
            "numGetsInLastMinute":0,
            "numGetsInLastFiveMinutes":0,
            "numGetsInLastFifteenMinutes":0,
            "numScansInLastTenSeconds":0,
            "numScansInLastMinute":0,
            "numScansInLastFiveMinutes":0,
            "numScansInLastFifteenMinutes":0,
            "LogLevelAlarm":0,
            "ServiceCLDBDownNotRunningAlarm":0,
            "ServiceFileserverDownNotRunningAlarm":0,
            "ServiceJTDownNotRunningAlarm":0,
            "ServiceTTDownNotRunningAlarm":0,
            "ServiceHBMasterDownNotRunningAlarm":0,
            "ServiceHBRegionDownNotRunningAlarm":0,
            "ServiceNFSDownNotRunningAlarm":0,
            "ServiceWebserverDownNotRunningAlarm":0,
            "ServiceHoststatsDownNotRunningAlarm":0,
            "DiskFailureAlarm":0,
            "VersionMismatchAlarm":0,
            "TimeSkewAlarm":0,
            "HbProcessingSlow":0,
            "RootPartitionFullAlarm":0,
            "HomeMapRFullAlarm":0,
            "CorePresentAlarm":0,
            "HighMfsMemoryAlarm":0,
            "PamMisconfiguredAlarm":0,
            "TTLocaldirFullAlarm":0,
            "NodeNoHeartbeatAlarm":0,
            "NodeMaprUserMismatchAlarm":0,
            "NodeDuplicateHostIdAlarm":0,
            "NodeMetricsWriteProblemAlarm":0,
            "NodeTooManyContainersAlarm":0,
            "IncorrectTopologyAlarm":0,
            "ServiceHueDownNotRunningAlarm":0,
            "ServiceHttpfsDownNotRunningAlarm":0,
            "ServiceBeeswaxDownNotRunningAlarm":0,
            "ServiceHiveDownNotRunningAlarm":0,
            "ServiceHs2DownNotRunningAlarm":0,
            "ServiceOozieDownNotRunningAlarm":0,
            "NodeManagerDown":0,
            "MemorySwapping":0,
            "DRILLDOWNALARM":0,
            "MemoryAllocationAlarm":0,
            "ResourceManagerDown":0,
            "JobHistoryServerDown":0
        },
...
    ]
}

Fields

For definitions of the output fields, and short names for use with filters, see the Fields table on the node command page.

 

Examples

List all nodes:

For best results, use the -json option when listing all nodes or a large subset of node information.

CLI

maprcli node list -json

REST

https://r1n1.sj.us:8443/rest/node/list

List the health and configuredservice of all nodes:

The following examples also show the use of short forms for the column parameter.

CLI

maprcli node list -columns service,health,configuredservice
maprcli node list -columns svc,h,csvc

REST

https://10.10.82.23:8443/rest/node/list?columns=service,health,configuredservice
https://10.10.82.23:8443/rest/node/list?columns=svc,h,csvs

List the number of slots on all nodes:

CLI

maprcli node list -columns ip,ttmapSlots,ttmapUsed,ttReduceSlots,ttReduceUsed

REST

https://r1n1.sj.us:8443/rest/node/list?columns=ip,ttmapSlots,ttmapUsed,ttReduceSlots,ttReduceUsed

 

List nodes on a particular subnet:

CLI

maprcli node list -filter [ip==192.168.10.*]

REST

https://r1n1.sj.us:8443/rest/node/list?filter=%5Bip%3D%3D192.168.10.*%5D