- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Get hive query from resource manager using yarn REST api
- Labels:
-
Apache YARN
-
Cloudera Manager
Created ‎09-08-2017 01:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I am exploring YARN REST api's and looking to get hive query from the configuration. I know how to get the query from the UI but can anyone suggest how to get the query from yarn REST api.
I am using http://<rm-host>:8088/ws/v1/cluster/apps?states=running&user=hive
Thank you.
Created ‎09-21-2017 05:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Update: I built a custom solution for this by using YARN RM API and by parsing job_tracker & hdfs config properties.
Here is the solution for ref: RM-Parser
Feel free to fork it or provide any suggestions.
Created ‎09-21-2017 05:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Update: I built a custom solution for this by using YARN RM API and by parsing job_tracker & hdfs config properties.
Here is the solution for ref: RM-Parser
Feel free to fork it or provide any suggestions.
Created ‎10-05-2017 01:17 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which URL need to be passed to get_user_query(job_tracker_url) function.
Created ‎10-05-2017 02:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Subash,
The code will handle passing the job tracker URL. ( it is the job tracker URL ).
In resource-manager -> Click on job -> Click on Application Master(Tracking Url).
However, after some testing, I found the above code is working MR code only as Tez and Spark jobs redirects to another URL.
I need to research a bit to make it work for all kind of apps. I hope this helps!
--
Shashant
Created ‎10-05-2017 02:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Update: In my recent changes, you will find the "get_user_query(job_tracker_url)" commented out.
Instead, I am fetching the Tracking URL for the job which is taking more time. But, the code is still there. Feel free to play with it.
Created ‎10-06-2017 09:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey @Shashant ,
You can try out ranger audit logs especially for Hive. Ranger captures all the column and table name. Few customization in code will help to get the full hive query.
Subash
Created ‎10-16-2017 06:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you @subash sharma . I will check that as well..
