Hadoop 2.x Administration Cookbook
上QQ阅读APP看书,第一时间看更新

Job history web interface and metrics

In the previous recipe, we enabled history server, and now we will use the Web UI to the explore YARN metrics and job history.

Getting ready

Make sure you have completed the previous recipe and have a History Server running as daemon, as shown here in the list of processes:

Getting ready

How to do it...

  1. Using web browser, connect to the JobHistoryServer Web UI port, which in this case is port 19888 and host IP master1.cyrus.com.
  2. Once connected to the Web UI, the user can see JobHistory and other details as shown here:
    How to do it...
  3. Under the Tools section on the left-most side, the user can see links to view YARN parameters currently in effect, using the link configuration as shown here:
    How to do it...
  4. Another section is metrics, which gives information about JvmMetrics, stats, and so on. The output format is JSON:
    How to do it...
  5. The preceding output can also be viewed from the command line, as shown in the following screenshot:
    How to do it...

How it works...

In Hadoop, each daemon has a built-in web server, which is a jetty server. Each server exposes metrics, which can be captured or explored using the JMX API calls. The JMX interface is very important for writing plugins for health checks or for triggering some events on a condition, as it can be queried simply using a CURL call.