Hello,
In my workflow, I need to monitor and eventually stop Spark jobs running on my Dataproc cluster remotely.
I found some information about Yarn Rest API to check and change a job's status. But, I encounter an issue when I try to kill a job with Rest API :
example :
curl -v -X PUT -d '{"state": "KILLED"}' 'http://my-yarn-master:8088/ws/v1/cluster/apps/application_XXXX/state'
I got the following error :
401 - Unauthorized
{
"RemoteException": {
"exception": "AuthorizationException",
"message": "Unable to obtain user name, user not authenticated",
"javaClassName": "org.apache.hadoop.security.authorize.AuthorizationException"
}
}
I found in some documentation that I need to activate HTTP authentification (kerberos?) on my cluster with some config :
"Please note that in order to kill an app, you must have an authentication filter setup for the HTTP interface. The functionality requires that a username is set in the HttpServletRequest. If no filter is setup, the response will be an "UNAUTHORIZED" response."
Is it true? Can't I just define in a property the user requesting this action?
Thanks a lot,
Regards