Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

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

Solved Go to solution

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

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

Accepted Solutions
Highlighted

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

Rising Star

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
Highlighted

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

Rising Star

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

Highlighted

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

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.

Highlighted

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

@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.

Don't have an account?
Coming from Hortonworks? Activate your account here