Toggle navigation
Home
java.lang.String to com.facebook.presto.hive.metastore.HivePrivilegeInfo
No. of Instances - 3
No. of Commits - 1
No. of Projects - {'presto'}
Hierarchy/Composition: -
Primitive Info: -
NameSpace: Jdk -> Internal
Mapping:
Other
Role::getRoleName
to
databaseName
Cascading Type Change (Different)
List<Role>
to
ImmutableSet.Builder<HivePrivilegeInfo>
Add or Remove Method invocation
stats.getLoadRoles().wrap(() -> { try (HiveMetastoreClient client=clientProvider.createMetastoreClient()){ ImmutableSet.Builder<HivePrivilegeInfo> roles=client.listRoles(user,USER); if (roles == null) { return ImmutableSet.of(); } return ImmutableSet.copyOf(roles.stream().map(databaseName).collect(toSet())); } } )
to
stats.getListPrivileges().wrap(() -> { try (HiveMetastoreClient client=clientProvider.createMetastoreClient()){ Table table=client.getTable(databaseName,tableName); ImmutableSet.Builder<HivePrivilegeInfo> privileges=ImmutableSet.builder(); if (principal.getType() == USER && table.getOwner().equals(principal.getName())) { privileges.add(new HivePrivilegeInfo(OWNERSHIP,true)); } List<HiveObjectPrivilege> hiveObjectPrivilegeList=client.listPrivileges(principal.getName(),fromPrestoPrincipalType(principal.getType()),new HiveObjectRef(TABLE,databaseName,tableName,null,null)); for ( HiveObjectPrivilege hiveObjectPrivilege : hiveObjectPrivilegeList) { privileges.addAll(parsePrivilege(hiveObjectPrivilege.getGrantInfo())); } return privileges.build(); } } )
Rename Variable
getRoles
to
listTablePrivileges