org.apache.hadoop.hive.ql.security.authorization
Class AuthorizationUtils

java.lang.Object
  extended by org.apache.hadoop.hive.ql.security.authorization.AuthorizationUtils

@InterfaceAudience.LimitedPrivate(value="Sql standard authorization plugin")
public class AuthorizationUtils
extends Object

Utility code shared by hive internal code and sql standard authorization plugin implementation


Constructor Summary
AuthorizationUtils()
           
 
Method Summary
static HivePrincipal.HivePrincipalType getHivePrincipalType(org.apache.hadoop.hive.metastore.api.PrincipalType type)
          Convert thrift principal type to authorization plugin principal type
static HivePrivilegeObject.HivePrivilegeObjectType getHivePrivilegeObjectType(Entity.Type type)
          Convert thrift object type to hive authorization plugin object type
static org.apache.hadoop.hive.metastore.api.HiveObjectRef getThriftHiveObjectRef(HivePrivilegeObject privObj)
          Convert thrift HiveObjectRef to plugin HivePrivilegeObject
static org.apache.hadoop.hive.metastore.api.HiveObjectType getThriftHiveObjType(HivePrivilegeObject.HivePrivilegeObjectType type)
          Convert plugin privilege object type to thrift type
static org.apache.hadoop.hive.metastore.api.PrincipalType getThriftPrincipalType(HivePrincipal.HivePrincipalType type)
          Convert authorization plugin principal type to thrift principal type
static org.apache.hadoop.hive.metastore.api.PrivilegeGrantInfo getThriftPrivilegeGrantInfo(HivePrivilege privilege, HivePrincipal grantorPrincipal, boolean grantOption, int grantTime)
          Get thrift privilege grant info
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthorizationUtils

public AuthorizationUtils()
Method Detail

getHivePrincipalType

public static HivePrincipal.HivePrincipalType getHivePrincipalType(org.apache.hadoop.hive.metastore.api.PrincipalType type)
                                                            throws HiveException
Convert thrift principal type to authorization plugin principal type

Parameters:
type - - thrift principal type
Returns:
Throws:
HiveException

getHivePrivilegeObjectType

public static HivePrivilegeObject.HivePrivilegeObjectType getHivePrivilegeObjectType(Entity.Type type)
Convert thrift object type to hive authorization plugin object type

Parameters:
type - - thrift object type
Returns:

getThriftPrincipalType

public static org.apache.hadoop.hive.metastore.api.PrincipalType getThriftPrincipalType(HivePrincipal.HivePrincipalType type)
Convert authorization plugin principal type to thrift principal type

Parameters:
type -
Returns:
Throws:
HiveException

getThriftPrivilegeGrantInfo

public static org.apache.hadoop.hive.metastore.api.PrivilegeGrantInfo getThriftPrivilegeGrantInfo(HivePrivilege privilege,
                                                                                                  HivePrincipal grantorPrincipal,
                                                                                                  boolean grantOption,
                                                                                                  int grantTime)
                                                                                           throws HiveException
Get thrift privilege grant info

Parameters:
privilege -
grantorPrincipal -
grantOption -
grantTime -
Returns:
Throws:
HiveException

getThriftHiveObjType

public static org.apache.hadoop.hive.metastore.api.HiveObjectType getThriftHiveObjType(HivePrivilegeObject.HivePrivilegeObjectType type)
                                                                                throws HiveException
Convert plugin privilege object type to thrift type

Parameters:
type -
Returns:
Throws:
HiveException

getThriftHiveObjectRef

public static org.apache.hadoop.hive.metastore.api.HiveObjectRef getThriftHiveObjectRef(HivePrivilegeObject privObj)
                                                                                 throws HiveException
Convert thrift HiveObjectRef to plugin HivePrivilegeObject

Parameters:
privObj -
Returns:
Throws:
HiveException


Copyright © 2014 The Apache Software Foundation. All rights reserved.