YARN also introduced REST API to access the information of the cluster, nodes of the cluster, applications, and so on. You can also build your own application to interact with YARN services by using these REST APIs. The important REST APIs provided by the YARN service are explained in the following sections.
The Resource Manager is the primary contact for any application and therefore it contains around 80% of the information that can be accessed via YARN's REST API. The YARN REST API has many retrieval applications, which will be explained as follows:
- Retrieving cluster information: The basic API is used to access cluster information that contains information such as clusterID, when did the cluster start, what is the state of the cluster, versions of Hadoop, the Resource Manager, and so on. The CURL request on the REST API will look as follows:
curl -X GET http://localhost:8088/ws/v1/cluster/info
The default response would be in JSON, but you can also specify...