Search in sources :

Example 1 with HivePrivilegeInfo

use of io.prestosql.plugin.hive.metastore.HivePrivilegeInfo in project hetu-core by openlookeng.

the class ThriftMetastoreUtil method listApplicableTablePrivileges.

public static Stream<HivePrivilegeInfo> listApplicableTablePrivileges(SemiTransactionalHiveMetastore metastore, String databaseName, String tableName, String user) {
    HivePrincipal userPrincipal = new HivePrincipal(USER, user);
    Stream<HivePrincipal> principals = Stream.concat(Stream.of(userPrincipal), listApplicableRoles(metastore, userPrincipal).map(role -> new HivePrincipal(ROLE, role)));
    return listTablePrivileges(metastore, databaseName, tableName, principals);
}
Also used : NUMBER_OF_TRUE_VALUES(io.prestosql.spi.statistics.ColumnStatisticType.NUMBER_OF_TRUE_VALUES) Arrays(java.util.Arrays) StorageFormat(io.prestosql.plugin.hive.metastore.StorageFormat) RoleGrant(io.prestosql.spi.security.RoleGrant) SerDeInfo(org.apache.hadoop.hive.metastore.api.SerDeInfo) BigDecimal(java.math.BigDecimal) BooleanColumnStatsData(org.apache.hadoop.hive.metastore.api.BooleanColumnStatsData) Math.round(java.lang.Math.round) Map(java.util.Map) RowType(io.prestosql.spi.type.RowType) DoubleColumnStatsData(org.apache.hadoop.hive.metastore.api.DoubleColumnStatsData) BigInteger(java.math.BigInteger) ENGLISH(java.util.Locale.ENGLISH) Chars.isCharType(io.prestosql.spi.type.Chars.isCharType) HiveErrorCode(io.prestosql.plugin.hive.HiveErrorCode) Longs(com.google.common.primitives.Longs) DecimalColumnStatsData(org.apache.hadoop.hive.metastore.api.DecimalColumnStatsData) ColumnStatisticsData.decimalStats(org.apache.hadoop.hive.metastore.api.ColumnStatisticsData.decimalStats) MAX_VALUE(io.prestosql.spi.statistics.ColumnStatisticType.MAX_VALUE) Set(java.util.Set) TIMESTAMP(io.prestosql.spi.type.TimestampType.TIMESTAMP) Stream(java.util.stream.Stream) Table(io.prestosql.plugin.hive.metastore.Table) Date(org.apache.hadoop.hive.metastore.api.Date) Database(io.prestosql.plugin.hive.metastore.Database) Partition(io.prestosql.plugin.hive.metastore.Partition) MIN_VALUE(io.prestosql.spi.statistics.ColumnStatisticType.MIN_VALUE) MapType(io.prestosql.spi.type.MapType) OptionalLong(java.util.OptionalLong) ImmutableSet.toImmutableSet(com.google.common.collect.ImmutableSet.toImmutableSet) AVRO(io.prestosql.plugin.hive.HiveStorageFormat.AVRO) DOUBLE(io.prestosql.spi.type.DoubleType.DOUBLE) SemiTransactionalHiveMetastore(io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore) LongColumnStatsData(org.apache.hadoop.hive.metastore.api.LongColumnStatsData) PrincipalPrivilegeSet(org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet) PrivilegeGrantInfo(org.apache.hadoop.hive.metastore.api.PrivilegeGrantInfo) Nullable(javax.annotation.Nullable) ColumnStatisticsData.binaryStats(org.apache.hadoop.hive.metastore.api.ColumnStatisticsData.binaryStats) AbstractIterator(com.google.common.collect.AbstractIterator) USER(io.prestosql.spi.security.PrincipalType.USER) MAX_VALUE_SIZE_IN_BYTES(io.prestosql.spi.statistics.ColumnStatisticType.MAX_VALUE_SIZE_IN_BYTES) PrincipalPrivileges(io.prestosql.plugin.hive.metastore.PrincipalPrivileges) HiveColumnStatistics(io.prestosql.plugin.hive.metastore.HiveColumnStatistics) StringColumnStatsData(org.apache.hadoop.hive.metastore.api.StringColumnStatsData) VARBINARY(io.prestosql.spi.type.VarbinaryType.VARBINARY) Strings.emptyToNull(com.google.common.base.Strings.emptyToNull) ColumnStatisticsData.longStats(org.apache.hadoop.hive.metastore.api.ColumnStatisticsData.longStats) DateColumnStatsData(org.apache.hadoop.hive.metastore.api.DateColumnStatsData) ArrayDeque(java.util.ArrayDeque) ColumnStatisticsData.stringStats(org.apache.hadoop.hive.metastore.api.ColumnStatisticsData.stringStats) PrestoPrincipal(io.prestosql.spi.security.PrestoPrincipal) PrincipalType(io.prestosql.spi.security.PrincipalType) HiveBasicStatistics(io.prestosql.plugin.hive.HiveBasicStatistics) Varchars.isVarcharType(io.prestosql.spi.type.Varchars.isVarcharType) ColumnStatisticsData.booleanStats(org.apache.hadoop.hive.metastore.api.ColumnStatisticsData.booleanStats) DecimalType(io.prestosql.spi.type.DecimalType) RolePrincipalGrant(org.apache.hadoop.hive.metastore.api.RolePrincipalGrant) ByteBuffer(java.nio.ByteBuffer) Preconditions.checkArgument(com.google.common.base.Preconditions.checkArgument) Locale(java.util.Locale) ColumnStatisticsData.doubleStats(org.apache.hadoop.hive.metastore.api.ColumnStatisticsData.doubleStats) BOOLEAN(io.prestosql.spi.type.BooleanType.BOOLEAN) Type(io.prestosql.spi.type.Type) PrimitiveTypeInfo(org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo) StorageDescriptor(org.apache.hadoop.hive.metastore.api.StorageDescriptor) BIGINT(io.prestosql.spi.type.BigintType.BIGINT) PrestoException(io.prestosql.spi.PrestoException) ImmutableSet(com.google.common.collect.ImmutableSet) ImmutableMap(com.google.common.collect.ImmutableMap) Predicate(java.util.function.Predicate) ArrayType(io.prestosql.spi.type.ArrayType) ColumnStatisticsObj(org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj) Collection(java.util.Collection) Decimal(org.apache.hadoop.hive.metastore.api.Decimal) Order(org.apache.hadoop.hive.metastore.api.Order) SelectedRole(io.prestosql.spi.security.SelectedRole) TINYINT(io.prestosql.spi.type.TinyintType.TINYINT) Streams(com.google.common.collect.Streams) HiveType(io.prestosql.plugin.hive.HiveType) String.format(java.lang.String.format) NUMBER_OF_DISTINCT_VALUES(io.prestosql.spi.statistics.ColumnStatisticType.NUMBER_OF_DISTINCT_VALUES) List(java.util.List) LocalDate(java.time.LocalDate) Optional(java.util.Optional) Queue(java.util.Queue) HiveBucketProperty(io.prestosql.plugin.hive.HiveBucketProperty) Strings.nullToEmpty(com.google.common.base.Strings.nullToEmpty) OptionalDouble(java.util.OptionalDouble) AVRO_SCHEMA_URL_KEY(io.prestosql.plugin.hive.HiveMetadata.AVRO_SCHEMA_URL_KEY) Shorts(com.google.common.primitives.Shorts) INTEGER(io.prestosql.spi.type.IntegerType.INTEGER) HivePrincipal(io.prestosql.plugin.hive.metastore.HivePrincipal) Function(java.util.function.Function) ColumnStatisticType(io.prestosql.spi.statistics.ColumnStatisticType) HashSet(java.util.HashSet) ROLE(io.prestosql.spi.security.PrincipalType.ROLE) ColumnStatisticsData.dateStats(org.apache.hadoop.hive.metastore.api.ColumnStatisticsData.dateStats) BinaryColumnStatsData(org.apache.hadoop.hive.metastore.api.BinaryColumnStatsData) HivePrivilegeInfo(io.prestosql.plugin.hive.metastore.HivePrivilegeInfo) Objects.requireNonNull(java.util.Objects.requireNonNull) DATE(io.prestosql.spi.type.DateType.DATE) REAL(io.prestosql.spi.type.RealType.REAL) TOTAL_SIZE_IN_BYTES(io.prestosql.spi.statistics.ColumnStatisticType.TOTAL_SIZE_IN_BYTES) NUMBER_OF_NON_NULL_VALUES(io.prestosql.spi.statistics.ColumnStatisticType.NUMBER_OF_NON_NULL_VALUES) CSV(io.prestosql.plugin.hive.HiveStorageFormat.CSV) PartitionWithStatistics(io.prestosql.plugin.hive.metastore.PartitionWithStatistics) ConnectorIdentity(io.prestosql.spi.security.ConnectorIdentity) PRIMITIVE(org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category.PRIMITIVE) TypeInfo(org.apache.hadoop.hive.serde2.typeinfo.TypeInfo) FieldSchema(org.apache.hadoop.hive.metastore.api.FieldSchema) Storage(io.prestosql.plugin.hive.metastore.Storage) Collectors.toList(java.util.stream.Collectors.toList) SMALLINT(io.prestosql.spi.type.SmallintType.SMALLINT) Column(io.prestosql.plugin.hive.metastore.Column) HivePrincipal(io.prestosql.plugin.hive.metastore.HivePrincipal)

Example 2 with HivePrivilegeInfo

use of io.prestosql.plugin.hive.metastore.HivePrivilegeInfo in project hetu-core by openlookeng.

the class ThriftHiveMetastore method grantTablePrivileges.

@Override
public void grantTablePrivileges(String databaseName, String tableName, HivePrincipal sourceGrantee, Set<HivePrivilegeInfo> privileges) {
    Set<PrivilegeGrantInfo> requestedPrivileges = privileges.stream().map(ThriftMetastoreUtil::toMetastoreApiPrivilegeGrantInfo).collect(Collectors.toSet());
    checkArgument(!containsAllPrivilege(requestedPrivileges), "\"ALL\" not supported in PrivilegeGrantInfo.privilege");
    HivePrincipal grantee = ThriftMetastoreUtil.applyRoleNameCaseSensitive(sourceGrantee, isRoleNameCaseSensitive);
    try {
        retry().stopOnIllegalExceptions().run("grantTablePrivileges", stats.getGrantTablePrivileges().wrap(() -> {
            try (ThriftMetastoreClient metastoreClient = clientProvider.createMetastoreClient()) {
                Set<HivePrivilegeInfo> existingPrivileges = listTablePrivileges(databaseName, tableName, grantee);
                Set<PrivilegeGrantInfo> privilegesToGrant = new HashSet<>(requestedPrivileges);
                Iterator<PrivilegeGrantInfo> iterator = privilegesToGrant.iterator();
                while (iterator.hasNext()) {
                    HivePrivilegeInfo requestedPrivilege = getOnlyElement(ThriftMetastoreUtil.parsePrivilege(iterator.next(), Optional.empty()));
                    for (HivePrivilegeInfo existingPrivilege : existingPrivileges) {
                        if ((requestedPrivilege.isContainedIn(existingPrivilege))) {
                            iterator.remove();
                        } else if (existingPrivilege.isContainedIn(requestedPrivilege)) {
                            throw new PrestoException(NOT_SUPPORTED, format("Granting %s WITH GRANT OPTION is not supported while %s possesses %s", requestedPrivilege.getHivePrivilege().name(), grantee, requestedPrivilege.getHivePrivilege().name()));
                        }
                    }
                }
                if (privilegesToGrant.isEmpty()) {
                    return null;
                }
                metastoreClient.grantPrivileges(buildPrivilegeBag(databaseName, tableName, grantee, privilegesToGrant));
            }
            return null;
        }));
    } catch (TException e) {
        throw new PrestoException(HiveErrorCode.HIVE_METASTORE_ERROR, e);
    } catch (Exception e) {
        throw propagate(e);
    }
}
Also used : TException(org.apache.thrift.TException) HivePrivilegeInfo(io.prestosql.plugin.hive.metastore.HivePrivilegeInfo) Set(java.util.Set) Collectors.toSet(java.util.stream.Collectors.toSet) ImmutableSet(com.google.common.collect.ImmutableSet) HashSet(java.util.HashSet) PrivilegeGrantInfo(org.apache.hadoop.hive.metastore.api.PrivilegeGrantInfo) HivePrincipal(io.prestosql.plugin.hive.metastore.HivePrincipal) Iterator(java.util.Iterator) PrestoException(io.prestosql.spi.PrestoException) HiveViewNotSupportedException(io.prestosql.plugin.hive.HiveViewNotSupportedException) TableAlreadyExistsException(io.prestosql.spi.connector.TableAlreadyExistsException) NoSuchTxnException(org.apache.hadoop.hive.metastore.api.NoSuchTxnException) AlreadyExistsException(org.apache.hadoop.hive.metastore.api.AlreadyExistsException) SchemaAlreadyExistsException(io.prestosql.spi.connector.SchemaAlreadyExistsException) TableNotFoundException(io.prestosql.spi.connector.TableNotFoundException) InvalidInputException(org.apache.hadoop.hive.metastore.api.InvalidInputException) InvalidOperationException(org.apache.hadoop.hive.metastore.api.InvalidOperationException) TxnAbortedException(org.apache.hadoop.hive.metastore.api.TxnAbortedException) ConfigValSecurityException(org.apache.hadoop.hive.metastore.api.ConfigValSecurityException) UnknownDBException(org.apache.hadoop.hive.metastore.api.UnknownDBException) TException(org.apache.thrift.TException) IOException(java.io.IOException) PartitionNotFoundException(io.prestosql.plugin.hive.PartitionNotFoundException) NoSuchObjectException(org.apache.hadoop.hive.metastore.api.NoSuchObjectException) MetaException(org.apache.hadoop.hive.metastore.api.MetaException) PrestoException(io.prestosql.spi.PrestoException) NoSuchLockException(org.apache.hadoop.hive.metastore.api.NoSuchLockException) UnknownTableException(org.apache.hadoop.hive.metastore.api.UnknownTableException) SchemaNotFoundException(io.prestosql.spi.connector.SchemaNotFoundException) InvalidObjectException(org.apache.hadoop.hive.metastore.api.InvalidObjectException)

Example 3 with HivePrivilegeInfo

use of io.prestosql.plugin.hive.metastore.HivePrivilegeInfo in project hetu-core by openlookeng.

the class SqlStandardAccessControlMetadata method buildGrants.

private List<GrantInfo> buildGrants(SchemaTableName tableName, HivePrincipal principal) {
    ImmutableList.Builder<GrantInfo> result = ImmutableList.builder();
    Set<HivePrivilegeInfo> hivePrivileges = metastore.listTablePrivileges(tableName.getSchemaName(), tableName.getTableName(), principal);
    for (HivePrivilegeInfo hivePrivilege : hivePrivileges) {
        Set<PrivilegeInfo> prestoPrivileges = hivePrivilege.toPrivilegeInfo();
        for (PrivilegeInfo prestoPrivilege : prestoPrivileges) {
            GrantInfo grant = new GrantInfo(prestoPrivilege, hivePrivilege.getGrantee().toPrestoPrincipal(), tableName, Optional.of(hivePrivilege.getGrantor().toPrestoPrincipal()), Optional.empty());
            result.add(grant);
        }
    }
    return result.build();
}
Also used : HivePrivilegeInfo(io.prestosql.plugin.hive.metastore.HivePrivilegeInfo) ImmutableList(com.google.common.collect.ImmutableList) GrantInfo(io.prestosql.spi.security.GrantInfo) PrivilegeInfo(io.prestosql.spi.security.PrivilegeInfo) HivePrivilegeInfo(io.prestosql.plugin.hive.metastore.HivePrivilegeInfo)

Example 4 with HivePrivilegeInfo

use of io.prestosql.plugin.hive.metastore.HivePrivilegeInfo in project boostkit-bigdata by kunpengcompute.

the class ThriftHiveMetastore method revokeTablePrivileges.

@Override
public void revokeTablePrivileges(String databaseName, String tableName, HivePrincipal sourceGrantee, Set<HivePrivilegeInfo> privileges) {
    Set<PrivilegeGrantInfo> requestedPrivileges = privileges.stream().map(ThriftMetastoreUtil::toMetastoreApiPrivilegeGrantInfo).collect(Collectors.toSet());
    checkArgument(!containsAllPrivilege(requestedPrivileges), "\"ALL\" not supported in PrivilegeGrantInfo.privilege");
    HivePrincipal grantee = ThriftMetastoreUtil.applyRoleNameCaseSensitive(sourceGrantee, isRoleNameCaseSensitive);
    try {
        retry().stopOnIllegalExceptions().run("revokeTablePrivileges", stats.getRevokeTablePrivileges().wrap(() -> {
            try (ThriftMetastoreClient metastoreClient = clientProvider.createMetastoreClient()) {
                Set<HivePrivilegeInfo.HivePrivilege> existingHivePrivileges = listTablePrivileges(databaseName, tableName, grantee).stream().map(HivePrivilegeInfo::getHivePrivilege).collect(toSet());
                Set<PrivilegeGrantInfo> privilegesToRevoke = requestedPrivileges.stream().filter(privilegeGrantInfo -> existingHivePrivileges.contains(getOnlyElement(ThriftMetastoreUtil.parsePrivilege(privilegeGrantInfo, Optional.empty())).getHivePrivilege())).collect(toSet());
                if (privilegesToRevoke.isEmpty()) {
                    return null;
                }
                metastoreClient.revokePrivileges(buildPrivilegeBag(databaseName, tableName, grantee, privilegesToRevoke));
            }
            return null;
        }));
    } catch (TException e) {
        throw new PrestoException(HiveErrorCode.HIVE_METASTORE_ERROR, e);
    } catch (Exception e) {
        throw propagate(e);
    }
}
Also used : TException(org.apache.thrift.TException) HivePrivilegeInfo(io.prestosql.plugin.hive.metastore.HivePrivilegeInfo) Set(java.util.Set) Collectors.toSet(java.util.stream.Collectors.toSet) ImmutableSet(com.google.common.collect.ImmutableSet) HashSet(java.util.HashSet) PrivilegeGrantInfo(org.apache.hadoop.hive.metastore.api.PrivilegeGrantInfo) HivePrincipal(io.prestosql.plugin.hive.metastore.HivePrincipal) PrestoException(io.prestosql.spi.PrestoException) HiveViewNotSupportedException(io.prestosql.plugin.hive.HiveViewNotSupportedException) TableAlreadyExistsException(io.prestosql.spi.connector.TableAlreadyExistsException) NoSuchTxnException(org.apache.hadoop.hive.metastore.api.NoSuchTxnException) AlreadyExistsException(org.apache.hadoop.hive.metastore.api.AlreadyExistsException) SchemaAlreadyExistsException(io.prestosql.spi.connector.SchemaAlreadyExistsException) TableNotFoundException(io.prestosql.spi.connector.TableNotFoundException) InvalidInputException(org.apache.hadoop.hive.metastore.api.InvalidInputException) InvalidOperationException(org.apache.hadoop.hive.metastore.api.InvalidOperationException) TxnAbortedException(org.apache.hadoop.hive.metastore.api.TxnAbortedException) ConfigValSecurityException(org.apache.hadoop.hive.metastore.api.ConfigValSecurityException) UnknownDBException(org.apache.hadoop.hive.metastore.api.UnknownDBException) TException(org.apache.thrift.TException) IOException(java.io.IOException) PartitionNotFoundException(io.prestosql.plugin.hive.PartitionNotFoundException) NoSuchObjectException(org.apache.hadoop.hive.metastore.api.NoSuchObjectException) MetaException(org.apache.hadoop.hive.metastore.api.MetaException) PrestoException(io.prestosql.spi.PrestoException) NoSuchLockException(org.apache.hadoop.hive.metastore.api.NoSuchLockException) UnknownTableException(org.apache.hadoop.hive.metastore.api.UnknownTableException) SchemaNotFoundException(io.prestosql.spi.connector.SchemaNotFoundException) InvalidObjectException(org.apache.hadoop.hive.metastore.api.InvalidObjectException)

Example 5 with HivePrivilegeInfo

use of io.prestosql.plugin.hive.metastore.HivePrivilegeInfo in project boostkit-bigdata by kunpengcompute.

the class ThriftHiveMetastore method grantTablePrivileges.

@Override
public void grantTablePrivileges(String databaseName, String tableName, HivePrincipal sourceGrantee, Set<HivePrivilegeInfo> privileges) {
    Set<PrivilegeGrantInfo> requestedPrivileges = privileges.stream().map(ThriftMetastoreUtil::toMetastoreApiPrivilegeGrantInfo).collect(Collectors.toSet());
    checkArgument(!containsAllPrivilege(requestedPrivileges), "\"ALL\" not supported in PrivilegeGrantInfo.privilege");
    HivePrincipal grantee = ThriftMetastoreUtil.applyRoleNameCaseSensitive(sourceGrantee, isRoleNameCaseSensitive);
    try {
        retry().stopOnIllegalExceptions().run("grantTablePrivileges", stats.getGrantTablePrivileges().wrap(() -> {
            try (ThriftMetastoreClient metastoreClient = clientProvider.createMetastoreClient()) {
                Set<HivePrivilegeInfo> existingPrivileges = listTablePrivileges(databaseName, tableName, grantee);
                Set<PrivilegeGrantInfo> privilegesToGrant = new HashSet<>(requestedPrivileges);
                Iterator<PrivilegeGrantInfo> iterator = privilegesToGrant.iterator();
                while (iterator.hasNext()) {
                    HivePrivilegeInfo requestedPrivilege = getOnlyElement(ThriftMetastoreUtil.parsePrivilege(iterator.next(), Optional.empty()));
                    for (HivePrivilegeInfo existingPrivilege : existingPrivileges) {
                        if ((requestedPrivilege.isContainedIn(existingPrivilege))) {
                            iterator.remove();
                        } else if (existingPrivilege.isContainedIn(requestedPrivilege)) {
                            throw new PrestoException(NOT_SUPPORTED, format("Granting %s WITH GRANT OPTION is not supported while %s possesses %s", requestedPrivilege.getHivePrivilege().name(), grantee, requestedPrivilege.getHivePrivilege().name()));
                        }
                    }
                }
                if (privilegesToGrant.isEmpty()) {
                    return null;
                }
                metastoreClient.grantPrivileges(buildPrivilegeBag(databaseName, tableName, grantee, privilegesToGrant));
            }
            return null;
        }));
    } catch (TException e) {
        throw new PrestoException(HiveErrorCode.HIVE_METASTORE_ERROR, e);
    } catch (Exception e) {
        throw propagate(e);
    }
}
Also used : TException(org.apache.thrift.TException) HivePrivilegeInfo(io.prestosql.plugin.hive.metastore.HivePrivilegeInfo) Set(java.util.Set) Collectors.toSet(java.util.stream.Collectors.toSet) ImmutableSet(com.google.common.collect.ImmutableSet) HashSet(java.util.HashSet) PrivilegeGrantInfo(org.apache.hadoop.hive.metastore.api.PrivilegeGrantInfo) HivePrincipal(io.prestosql.plugin.hive.metastore.HivePrincipal) Iterator(java.util.Iterator) PrestoException(io.prestosql.spi.PrestoException) HiveViewNotSupportedException(io.prestosql.plugin.hive.HiveViewNotSupportedException) TableAlreadyExistsException(io.prestosql.spi.connector.TableAlreadyExistsException) NoSuchTxnException(org.apache.hadoop.hive.metastore.api.NoSuchTxnException) AlreadyExistsException(org.apache.hadoop.hive.metastore.api.AlreadyExistsException) SchemaAlreadyExistsException(io.prestosql.spi.connector.SchemaAlreadyExistsException) TableNotFoundException(io.prestosql.spi.connector.TableNotFoundException) InvalidInputException(org.apache.hadoop.hive.metastore.api.InvalidInputException) InvalidOperationException(org.apache.hadoop.hive.metastore.api.InvalidOperationException) TxnAbortedException(org.apache.hadoop.hive.metastore.api.TxnAbortedException) ConfigValSecurityException(org.apache.hadoop.hive.metastore.api.ConfigValSecurityException) UnknownDBException(org.apache.hadoop.hive.metastore.api.UnknownDBException) TException(org.apache.thrift.TException) IOException(java.io.IOException) PartitionNotFoundException(io.prestosql.plugin.hive.PartitionNotFoundException) NoSuchObjectException(org.apache.hadoop.hive.metastore.api.NoSuchObjectException) MetaException(org.apache.hadoop.hive.metastore.api.MetaException) PrestoException(io.prestosql.spi.PrestoException) NoSuchLockException(org.apache.hadoop.hive.metastore.api.NoSuchLockException) UnknownTableException(org.apache.hadoop.hive.metastore.api.UnknownTableException) SchemaNotFoundException(io.prestosql.spi.connector.SchemaNotFoundException) InvalidObjectException(org.apache.hadoop.hive.metastore.api.InvalidObjectException)

Aggregations

HivePrivilegeInfo (io.prestosql.plugin.hive.metastore.HivePrivilegeInfo)16 ImmutableSet (com.google.common.collect.ImmutableSet)14 HivePrincipal (io.prestosql.plugin.hive.metastore.HivePrincipal)12 PrestoException (io.prestosql.spi.PrestoException)12 Set (java.util.Set)12 ImmutableSet.toImmutableSet (com.google.common.collect.ImmutableSet.toImmutableSet)10 HashSet (java.util.HashSet)8 Collectors.toSet (java.util.stream.Collectors.toSet)8 PrivilegeGrantInfo (org.apache.hadoop.hive.metastore.api.PrivilegeGrantInfo)8 SemiTransactionalHiveMetastore (io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore)6 USER (io.prestosql.spi.security.PrincipalType.USER)6 RoleGrant (io.prestosql.spi.security.RoleGrant)6 List (java.util.List)6 ENGLISH (java.util.Locale.ENGLISH)6 Objects.requireNonNull (java.util.Objects.requireNonNull)6 Optional (java.util.Optional)6 ImmutableList (com.google.common.collect.ImmutableList)5 GrantInfo (io.prestosql.spi.security.GrantInfo)5 PrivilegeInfo (io.prestosql.spi.security.PrivilegeInfo)5 Preconditions.checkArgument (com.google.common.base.Preconditions.checkArgument)4