All YARN daemons expose a set of URIs as REST APIs to fetch cluster information. The format for a URI representing a REST API is as follows:
http://{http address of service}/ws/{version}/{resourcepath}
It consists of the following three placeholders:
http address of service
: This is a set of the host name (or IP address) and HTTP port for a YARN service or a DNS mapping to host and port, if hosted publically. For example, the HTTP address of a REST API for ResourceManager with host namemaster
and HTTP port8088
will bemaster:8088
.version
: This is the latest version number for the APIs defined by YARN services. The current version of YARN services isv1
.resourcepath
: This path is uniquely resolved to a resource at the server. For example, the value of a resource path defined to fetch cluster metrics iscluster/metrics
.
Hence, a sample URI for the ResourceManager service to fetch cluster metrics will be:
http://master:8088/ws/v1/cluster/metrics
.