saihemanth-cloudera commented on code in PR #5343:
URL: https://github.com/apache/hive/pull/5343#discussion_r1684688498
##########
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/metastore/HiveMetaStoreAuthorizableEvent.java:
##########
@@ -64,6 +61,12 @@ protected HivePrivilegeObject getHivePrivilegeObject(Table
table) {
table.getOwner(), table.getOwnerType());
}
+ protected HivePrivilegeObject getHivePrivilegeObjectStorageHandlerUri(String
storagehandler_uri, Table table) {
Review Comment:
This method is not used anymore now.
##########
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/metastore/events/CreateTableEvent.java:
##########
@@ -79,6 +83,24 @@ private List<HivePrivilegeObject> getOutputHObjs() {
Database database = event.getDatabase();
String uri = getSdLocation(table.getSd());
+ // if the table is an iceberg storagehandler based table , need storageuri
as hive privilege objects
+ // format: storagehandler type + cluster + location
+ LOG.debug("<== CreateTableEvent.getOutputHObjs(): ret={}", ret);
+ if
(table.getParameters().containsKey(hive_metastoreConstants.META_TABLE_STORAGE))
{
+ Configuration conf = new Configuration();
+ try {
+ HiveStorageHandler hiveStorageHandler = (HiveStorageHandler)
ReflectionUtils.newInstance(
+
conf.getClassByName(table.getParameters().get(hive_metastoreConstants.META_TABLE_STORAGE)),
event.getHandler().getConf());
+ String storageUri = hiveStorageHandler.getURIForAuth(table).toString();
Review Comment:
I think it would be better to form a storageUri, only if this is an
iceberg-based table.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]