You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Ravi Kumar <ra...@persistent.co.in> on 2014/11/17 14:50:44 UTC

Show current roles failing on Apache hive 0.13.1

Hi All
I am trying to run 'Show current roles' on Apache hive 0.13.1 but getting following error,

hive> SHOW CURRENT ROLES;
Error in role operation show_current_role on role name null, error message Unkown role operation show_current_role
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask


Can someone tell me whether this command is supported on apache Hive 0.13.1 or not. If it is supported the what could be the issue. Any pointer would be really helpful.

Thanks and regrads,
Ravi


DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.


答复: Show current roles failing on Apache hive 0.13.1

Posted by "ericni.ni" <er...@vipshop.com>.
Refer to the org.apache.Hadoop.hive.ql.exec.DDLTask.roleDDL function, AuthorizationMode doesn't support  SHOW CURRENT ROLES statement
But AuthorizationModeV2 supports this:

private int roleDDLV2(RoleDDLDesc roleDDLDesc) throws HiveException, IOException {
…….
    case SHOW_CURRENT_ROLE:
      List<String> roleNames = authorizer.getCurrentRoleNames();
      writeListToFileAfterSort(roleNames, roleDDLDesc.getResFile());
      break;

But by default,hive uses AuthorizationMode (because the default value of hive.security.authorization.manager is org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvider,which means AuthorizationMode )
If you want to use AuthorizationModeV2,you must use another authorization class which implements the org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAuthorizerFactory interface but not the org.apache.hadoop.hive.ql.security.authorization.HiveAuthorizationProvider interface
such as  org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLPrivilegeType


发件人: Ravi Kumar [mailto:ravi_kumar@persistent.co.in]
发送时间: 2014年11月17日 21:51
收件人: user@hive.apache.org
主题: Show current roles failing on Apache hive 0.13.1

Hi All
I am trying to run ‘Show current roles’ on Apache hive 0.13.1 but getting following error,

hive> SHOW CURRENT ROLES;
Error in role operation show_current_role on role name null, error message Unkown role operation show_current_role
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask


Can someone tell me whether this command is supported on apache Hive 0.13.1 or not. If it is supported the what could be the issue. Any pointer would be really helpful.

Thanks and regrads,
Ravi


DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.

本电子邮件可能为保密文件。如果阁下非电子邮件所指定之收件人,谨请立即通知本人。敬请阁下不要使用、保存、复印、打印、散布本电子邮件及其内容,或将其用于其他任何目的或向任何人披露。谢谢您的合作! This communication is intended only for the addressee(s) and may contain information that is privileged and confidential. You are hereby notified that, if you are not an intended recipient listed above, or an authorized employee or agent of an addressee of this communication responsible for delivering e-mail messages to an intended recipient, any dissemination, distribution or reproduction of this communication (including any attachments hereto) is strictly prohibited. If you have received this communication in error, please notify us immediately by a reply e-mail addressed to the sender and permanently delete the original e-mail communication and any attachments from all storage devices without making or otherwise retaining a copy.