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

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

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

Hive.showPrivilegeGrant介绍

暂无

代码示例

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

if (privObj == null) {
 privs.addAll(hive.showPrivilegeGrant(HiveObjectType.GLOBAL, name, type,
   null, null, null, null));
} else if (privObj.getDbname() == null) {
 privs.addAll(hive.showPrivilegeGrant(null, name, type, null, null, null, null));
} else {
 Database dbObj = hive.getDatabase(privObj.getDbname());;
  privs.addAll(hive.showPrivilegeGrant(HiveObjectType.DATABASE,
    name, type, dbObj.getName(), null, null, null));
 } else {
    privs.addAll(hive.showPrivilegeGrant(HiveObjectType.COLUMN, name, type,
      dbObj.getName(), tableObj.getTableName(), partValues, columnName));
   privs.addAll(hive.showPrivilegeGrant(HiveObjectType.TABLE, name, type,
     dbObj.getName(), tableObj.getTableName(), null, null));
  } else {
   privs.addAll(hive.showPrivilegeGrant(HiveObjectType.PARTITION, name, type,
     dbObj.getName(), tableObj.getTableName(), partValues, null));

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

if (privObj == null) {
 privs.addAll(hive.showPrivilegeGrant(HiveObjectType.GLOBAL, name, type,
   null, null, null, null));
} else if (privObj.getDbname() == null) {
 privs.addAll(hive.showPrivilegeGrant(null, name, type, null, null, null, null));
} else {
 Database dbObj = hive.getDatabase(privObj.getDbname());;
  privs.addAll(hive.showPrivilegeGrant(HiveObjectType.DATABASE,
    name, type, dbObj.getName(), null, null, null));
 } else {
    privs.addAll(hive.showPrivilegeGrant(HiveObjectType.COLUMN, name, type,
      dbObj.getName(), tableObj.getTableName(), partValues, columnName));
   privs.addAll(hive.showPrivilegeGrant(HiveObjectType.TABLE, name, type,
     dbObj.getName(), tableObj.getTableName(), null, null));
  } else {
   privs.addAll(hive.showPrivilegeGrant(HiveObjectType.PARTITION, name, type,
     dbObj.getName(), tableObj.getTableName(), partValues, null));

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

if (privObj == null) {
 privs.addAll(hive.showPrivilegeGrant(HiveObjectType.GLOBAL, name, type,
   null, null, null, null));
} else if (privObj.getDbname() == null) {
 privs.addAll(hive.showPrivilegeGrant(null, name, type, null, null, null, null));
} else {
 Database dbObj = hive.getDatabase(privObj.getDbname());;
  privs.addAll(hive.showPrivilegeGrant(HiveObjectType.DATABASE,
    name, type, dbObj.getName(), null, null, null));
 } else {
    privs.addAll(hive.showPrivilegeGrant(HiveObjectType.COLUMN, name, type,
      dbObj.getName(), tableObj.getTableName(), partValues, columnName));
   privs.addAll(hive.showPrivilegeGrant(HiveObjectType.TABLE, name, type,
     dbObj.getName(), tableObj.getTableName(), null, null));
  } else {
   privs.addAll(hive.showPrivilegeGrant(HiveObjectType.PARTITION, name, type,
     dbObj.getName(), tableObj.getTableName(), partValues, null));

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

String principalName = principalDesc.getName();
if (hiveObjectDesc == null) {
 List<HiveObjectPrivilege> users = db.showPrivilegeGrant(
   HiveObjectType.GLOBAL, principalName, principalDesc.getType(),
   null, null, null, null);
  List<HiveObjectPrivilege> dbs = db.showPrivilegeGrant(HiveObjectType.DATABASE, principalName,
    principalDesc.getType(), dbName, null, null, null);
  if (dbs != null && dbs.size() > 0) {
    List<HiveObjectPrivilege> columnss = db.showPrivilegeGrant(
      HiveObjectType.COLUMN, principalName,
      principalDesc.getType(), dbName, tableName, partValues,
   List<HiveObjectPrivilege> parts = db.showPrivilegeGrant(
     HiveObjectType.PARTITION, principalName, principalDesc
       .getType(), dbName, tableName, partValues, null);
   List<HiveObjectPrivilege> tbls = db.showPrivilegeGrant(
     HiveObjectType.TABLE, principalName, principalDesc.getType(),
     dbName, tableName, null, null);

相关文章

Hive类方法