org.apache.hadoop.hive.metastore.api.Table.setPrivileges()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(119)

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

Table.setPrivileges介绍

暂无

代码示例

代码示例来源:origin: prestodb/presto

public static org.apache.hadoop.hive.metastore.api.Table toMetastoreApiTable(Table table, PrincipalPrivileges privileges)
{
  org.apache.hadoop.hive.metastore.api.Table result = new org.apache.hadoop.hive.metastore.api.Table();
  result.setDbName(table.getDatabaseName());
  result.setTableName(table.getTableName());
  result.setOwner(table.getOwner());
  result.setTableType(table.getTableType());
  result.setParameters(table.getParameters());
  result.setPartitionKeys(table.getPartitionColumns().stream().map(ThriftMetastoreUtil::toMetastoreApiFieldSchema).collect(toList()));
  result.setSd(makeStorageDescriptor(table.getTableName(), table.getDataColumns(), table.getStorage()));
  result.setPrivileges(toMetastoreApiPrincipalPrivilegeSet(table.getOwner(), privileges));
  result.setViewOriginalText(table.getViewOriginalText().orElse(null));
  result.setViewExpandedText(table.getViewExpandedText().orElse(null));
  return result;
}

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

private static class ThreadLocalHive extends ThreadLocal<Hive> {
 @Override
 protected Hive initialValue() {
  return null;
 }
 @Override
 public synchronized void set(Hive hiveObj) {
  Hive currentHive = this.get();
  if (currentHive != hiveObj) {
   // Remove/close current thread-local Hive object before overwriting with new Hive object.
   remove();
   super.set(hiveObj);
  }
 }
 @Override
 public synchronized void remove() {
  Hive currentHive = this.get();
  if (currentHive != null) {
   // Close the metastore connections before removing it from thread local hiveDB.
   currentHive.close(false);
   super.remove();
  }
 }
}

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

principalPrivs.setGroupPrivileges(grants.getGroupGrants());
principalPrivs.setRolePrivileges(grants.getRoleGrants());
tt.setPrivileges(principalPrivs);

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

principalPrivs.setGroupPrivileges(grants.getGroupGrants());
principalPrivs.setRolePrivileges(grants.getRoleGrants());
tTbl.setPrivileges(principalPrivs);

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

unsetPrivileges();
} else {
 setPrivileges((PrincipalPrivilegeSet)value);

代码示例来源:origin: prestosql/presto

public static org.apache.hadoop.hive.metastore.api.Table toMetastoreApiTable(Table table, PrincipalPrivileges privileges)
{
  org.apache.hadoop.hive.metastore.api.Table result = new org.apache.hadoop.hive.metastore.api.Table();
  result.setDbName(table.getDatabaseName());
  result.setTableName(table.getTableName());
  result.setOwner(table.getOwner());
  result.setTableType(table.getTableType());
  result.setParameters(table.getParameters());
  result.setPartitionKeys(table.getPartitionColumns().stream().map(ThriftMetastoreUtil::toMetastoreApiFieldSchema).collect(toList()));
  result.setSd(makeStorageDescriptor(table.getTableName(), table.getDataColumns(), table.getStorage()));
  result.setPrivileges(toMetastoreApiPrincipalPrivilegeSet(privileges));
  result.setViewOriginalText(table.getViewOriginalText().orElse(null));
  result.setViewExpandedText(table.getViewExpandedText().orElse(null));
  return result;
}

代码示例来源:origin: uk.co.nichesolutions.presto/presto-hive

table.setPrivileges(new PrincipalPrivilegeSet(
    ImmutableMap.of(session.getUser(), ImmutableList.of(allPrivileges)),
    ImmutableMap.of(),

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

principalPrivs.setGroupPrivileges(grants.getGroupGrants());
principalPrivs.setRolePrivileges(grants.getRoleGrants());
tt.setPrivileges(principalPrivs);

代码示例来源:origin: uk.co.nichesolutions.presto/presto-hive

table.setPrivileges(new PrincipalPrivilegeSet(
    ImmutableMap.of(tableOwner, ImmutableList.of(allPrivileges)),
    ImmutableMap.of(),

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

principalPrivs.setGroupPrivileges(grants.getGroupGrants());
principalPrivs.setRolePrivileges(grants.getRoleGrants());
tTbl.setPrivileges(principalPrivs);

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

principalPrivs.setGroupPrivileges(grants.getGroupGrants());
principalPrivs.setRolePrivileges(grants.getRoleGrants());
tTbl.setPrivileges(principalPrivs);

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

unsetPrivileges();
} else {
 setPrivileges((PrincipalPrivilegeSet)value);

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

unsetPrivileges();
} else {
 setPrivileges((PrincipalPrivilegeSet)value);

代码示例来源:origin: org.spark-project.hive/hive-metastore

unsetPrivileges();
} else {
 setPrivileges((PrincipalPrivilegeSet)value);

代码示例来源:origin: org.apache.hive/hive-standalone-metastore

unsetPrivileges();
} else {
 setPrivileges((PrincipalPrivilegeSet)value);

相关文章

Table类方法