- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
getting completed jobs using cloudera manager API
- Labels:
-
Apache YARN
-
Cloudera Manager
Created on 12-05-2017 07:37 AM - edited 09-16-2022 05:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Guys,
I trying to get all the finished applications ( which is not running, it may killed, success etc ...), and using the cloudera manager API, but with no success, can anyone help what i'm missing in the below command, i'm collecting the metrics each 5 minutes
STARTDATE=`date -d " -5 minute" "+%FT%T"`
result=`curl -u 'admin' : 'admin' 'http://cloudera_manager_host:7180/api/v11/clusters/cluster/services/yarn/yarnApplications?from='$STA...)'`
Created 06-20-2018 11:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You've probably figured it out, but for other readers: just remove the single quotes ' ' around $STARTDATE in the url.
(...)yarnApplications?from=${STARTDATE}&filters(...)
Created 09-23-2018 05:59 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Sir,
I used the following command in the UI
https://<HOSTNAME:PORT> /api/v16/clusters/cluster/services/yarn/yarnApplications?from=2018-09-22T00:00:01Z&to=2018-09-22T23:59:59Z&filter(user=xxxx)
The result does not get filtered by user. I always the result for all users
I appreciate your suggestions on this.
Thanks,
Created on 09-23-2018 09:00 PM - edited 09-24-2018 03:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@anrama try using filter=user=xxxx
STARTDATE=`date -d " -5 minute" "+%FT%T"`
result=`curl -u 'admin' : 'admin' 'cloudera_manager_host:port/api/v11/clusters/cluster/services/yarn/yarnApplications?from='$STARTDATE'&limit=1000&filter=user=xxx'`
echo $result
Created 09-24-2018 07:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great .your suggestion worked. It worked.
Thanks,
Created 11-12-2018 01:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ex: filter= state = FINISHED and filter =state = SUCCEEDED
2. Can I use NOT EQUAL
ex: filter = state != RUNNING
I appreciate your help
Created 11-22-2018 08:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@anrama You can user the filter=status!=Running