Support Questions

Find answers, ask questions, and share your expertise

How to kill Hive job with individual user ID when hive doas=false is set in HiveServer2 (hive impersonation)

avatar
Expert Contributor

When a user submits a query via Beeline, HS2 in turn runs the query with user hive as doas is set to false.

How could a user kill the job? It should be a command via beeline to ask HS2 to kill on behalf of a user.

Snapshot:

XYZ $ yarn application -kill application_1461543063850_12340

16/05/16 11:56:13 INFO impl.TimelineClientImpl: Timeline service address: ...

16/05/16 11:56:13 INFO client.RMProxy: Connecting to ResourceManager at ...

Killing application application_1461543063850_12340

Exception in thread "main" org.apache.hadoop.yarn.exceptions.YarnException: java.security.AccessControlException: User XYZ cannot perform operation MODIFY_APP on application_1461543063850_12340

1 ACCEPTED SOLUTION

avatar
Expert Contributor

If you enable yarn.acl.enable, you can use an user defined by yarn.admin.acl to kill the application.

View solution in original post

3 REPLIES 3

avatar
Expert Contributor

If you enable yarn.acl.enable, you can use an user defined by yarn.admin.acl to kill the application.

avatar
Expert Contributor

That should work. My original thought is to grant a user the ability to kill his own job. It is OK to promote him to the admin of the Yarn queue.

avatar

@ScipioTheYounger

Only the Hive users can kill the job or the instance on which user job is running will have privileges to kill the job. If you want the By setting hive.server2.enable.doAs=true will give access to the user who running job can kill.