pvary commented on a change in pull request #2714:
URL: https://github.com/apache/hive/pull/2714#discussion_r727955388
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/command/CommandAuthorizerV2.java
##########
@@ -201,17 +196,15 @@ private static void addHivePrivObject(Entity privObject,
Map<String, List<String
hiveOpType == HiveOperationType.ALTERTABLE_PROPERTIES ||
hiveOpType == HiveOperationType.CREATETABLE_AS_SELECT) {
String storageuri = null;
- Map<String, String> tableProperties = new HashMap<>();
Configuration conf = new Configuration();
- tableProperties.putAll(table.getSd().getSerdeInfo().getParameters());
- tableProperties.putAll(table.getParameters());
try {
if (table.getStorageHandler() instanceof
HiveStorageAuthorizationHandler) {
HiveStorageAuthorizationHandler authorizationHandler =
(HiveStorageAuthorizationHandler) ReflectionUtils.newInstance(
conf.getClassByName(table.getStorageHandler().getClass().getName()),
SessionState.get().getConf());
- storageuri =
authorizationHandler.getURIForAuth(tableProperties).toString();
+ storageuri =
authorizationHandler.getURIForAuth(table.getTTable()).toString();
} else {
//Custom storage handler that has not implemented the
HiveStorageAuthorizationHandler
+ Map<String, String> tableProperties =
HiveCustomStorageHandlerUtils.getTableProperties(table.getTTable());
Review comment:
Why not use a default implementation here.
--
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]