org.apache.hadoop.hive.ql.metadata.Hive.get_privilege_set()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(198)

本文整理了Java中org.apache.hadoop.hive.ql.metadata.Hive.get_privilege_set()方法的一些代码示例,展示了Hive.get_privilege_set()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hive.get_privilege_set()方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.metadata.Hive
类名称:Hive
方法名:get_privilege_set

Hive.get_privilege_set介绍

暂无

代码示例

代码示例来源:origin: apache/hive

public PrincipalPrivilegeSet get_privilege_set(HiveObjectType column, String dbName,
  String tableName, List<String> partValues, String col, String userName,
  List<String> groupNames) throws HiveException {
 if (!isRunFromMetaStore()) {
  return Hive.getWithFastCheck(conf).get_privilege_set(
    column, dbName, tableName, partValues, col, userName, groupNames);
 } else {
  HiveObjectRef hiveObj = new HiveObjectRef(column, dbName,
    tableName, partValues, col);
  try {
   return handler.get_privilege_set(hiveObj, userName, groupNames);
  } catch (MetaException e) {
   throw new HiveException(e);
  } catch (TException e) {
   throw new HiveException(e);
  }
 }
}

代码示例来源:origin: apache/drill

public PrincipalPrivilegeSet get_privilege_set(HiveObjectType column, String dbName,
  String tableName, List<String> partValues, String col, String userName,
  List<String> groupNames) throws HiveException {
 if (!isRunFromMetaStore()) {
  return Hive.getWithFastCheck(conf).get_privilege_set(
    column, dbName, tableName, partValues, col, userName, groupNames);
 } else {
  HiveObjectRef hiveObj = new HiveObjectRef(column, dbName,
    tableName, partValues, col);
  try {
   return handler.get_privilege_set(hiveObj, userName, groupNames);
  } catch (MetaException e) {
   throw new HiveException(e);
  } catch (TException e) {
   throw new HiveException(e);
  }
 }
}

代码示例来源:origin: org.apache.hadoop.hive/hive-exec

protected boolean authorizeUserPriv(Privilege[] inputRequiredPriv,
  boolean[] inputCheck, Privilege[] outputRequiredPriv,
  boolean[] outputCheck) throws HiveException {
 PrincipalPrivilegeSet privileges = hive_db.get_privilege_set(
   HiveObjectType.GLOBAL, null, null, null, null, this.getAuthenticator()
     .getUserName(), this.getAuthenticator().getGroupNames());
 return authorizePrivileges(privileges, inputRequiredPriv, inputCheck,
   outputRequiredPriv, outputCheck);
}

代码示例来源:origin: com.facebook.presto.hive/hive-apache

public PrincipalPrivilegeSet get_privilege_set(HiveObjectType column, String dbName,
  String tableName, List<String> partValues, String col, String userName,
  List<String> groupNames) throws HiveException {
 if (!isRunFromMetaStore()) {
  return hiveClient.get_privilege_set(
    column, dbName, tableName, partValues, col, userName, groupNames);
 } else {
  HiveObjectRef hiveObj = new HiveObjectRef(column, dbName,
    tableName, partValues, col);
  try {
   return handler.get_privilege_set(hiveObj, userName, groupNames);
  } catch (MetaException e) {
   throw new HiveException(e);
  } catch (TException e) {
   throw new HiveException(e);
  }
 }
}

代码示例来源:origin: org.apache.hadoop.hive/hive-exec

PrincipalPrivilegeSet dbPrivileges = hive_db.get_privilege_set(
  HiveObjectType.DATABASE, db.getName(), null, null, null, this
    .getAuthenticator().getUserName(), this.getAuthenticator()

代码示例来源:origin: org.apache.hadoop.hive/hive-exec

/**
 * Check privileges on User, DB and table objects.
 * 
 * @param table
 * @param inputRequiredPriv
 * @param outputRequiredPriv
 * @param inputCheck
 * @param outputCheck
 * @return true if the check passed
 * @throws HiveException
 */
private boolean authorizeUserDBAndTable(Table table,
  Privilege[] inputRequiredPriv, Privilege[] outputRequiredPriv,
  boolean[] inputCheck, boolean[] outputCheck) throws HiveException {
 
 if (authorizeUserAndDBPriv(hive_db.getDatabase(table.getDbName()),
   inputRequiredPriv, outputRequiredPriv, inputCheck, outputCheck)) {
  return true;
 }
 PrincipalPrivilegeSet tablePrivileges = hive_db.get_privilege_set(
   HiveObjectType.TABLE, table.getDbName(), table.getTableName(), null,
   null, this.getAuthenticator().getUserName(), this.getAuthenticator()
     .getGroupNames());
 if (authorizePrivileges(tablePrivileges, inputRequiredPriv, inputCheck,
   outputRequiredPriv, outputCheck)) {
  return true;
 }
 return false;
}

代码示例来源:origin: org.apache.hadoop.hive/hive-exec

.get_privilege_set(HiveObjectType.COLUMN, table.getDbName(), table.getTableName(),
  partValues, col, this.getAuthenticator().getUserName(), this
    .getAuthenticator().getGroupNames());

代码示例来源:origin: org.apache.hadoop.hive/hive-exec

partPrivileges = hive_db.get_privilege_set(HiveObjectType.PARTITION, part
  .getTable().getDbName(), part.getTable().getTableName(), part
  .getValues(), null, this.getAuthenticator().getUserName(), this

相关文章

Hive类方法