Getting Hadoop Job tracker Metrics in JSON

I am looking for a way to list all JobTracker and TaskTracker in JSON . When I try http://[myjobtrackermachine]:50030/metrics?format=json , I return an empty JSON string (although there are a lot of details in the user interface).

What am I missing?

+6
source share
1 answer

From some experience with json and java api, you might not have a json provider, you may need a library such as jackson or gson in the class path. These libraries can use reflection in pojo to convert them to json. Even if it is not a rest api, I am sure that it relies on some external json library. Hope this helps.

I found a couple of links that point to hadoop using the jailson api, so I assume this might be your problem. https://groups.google.com/a/cloudera.org/forum/?fromgroups=#!topic/cdh-user/PieR2X77X90

0
source

Source: https://habr.com/ru/post/910326/


All Articles