When making calls to the YARN REST Api via curl
, to get the jobs on the cluster, using:
curl --negotiate -u : http:<rm url>:<port>/ws/v1/cluster/apps?states=finished,failed,killed
In the resulting JSON, I get all the values but startedTime
, finishedTime
and elapsedTime
have value 0.
N.B: On the YARN UI, these values are present, and also when using the cmd yarn application -status
.
I checked on the API documentation, and I couldn't find a parameter to force the fields returned, is it because of some parameter that I can't get these values?
I'd answer my question in case someone has the same issue.
After more research, I found that the access to some metrics via the YARN REST API in a Kerberized cluster is restricted via ACLs, only the user who lunched the job and the admin users are able to access these metrics.
To bypass this, we ought to:
yarn.admin.acl=false
or
yarn.scheduler.capacity.root.acl_administer_jobs=*
yarn.scheduler.capacity.root.acl_administer_queue=*