deniskuzZ commented on code in PR #3482:
URL: https://github.com/apache/hive/pull/3482#discussion_r932459551
##########
jdbc-handler/src/main/java/org/apache/hive/storage/jdbc/JdbcStorageHandler.java:
##########
@@ -99,7 +101,10 @@ public void configureInputJobProperties(TableDesc
tableDesc, Map<String, String>
@Override
public URI getURIForAuth(Table table) throws URISyntaxException {
Map<String, String> tableProperties =
HiveCustomStorageHandlerUtils.getTableProperties(table);
- String host_url = tableProperties.get(Constants.JDBC_URL);
+ DatabaseType dbType = DatabaseType.valueOf(
+ tableProperties.get(JdbcStorageConfig.DATABASE_TYPE.getPropertyName()));
+ String host_url = DatabaseType.METASTORE == dbType ?
+ "internal:metastore://" : tableProperties.get(Constants.JDBC_URL);
Review Comment:
With the current setup
````
'HivePrivilegeObject':{'type':STORAGEHANDLER_URI, 'dbName':null,
'objectType':STORAGEHANDLER_URI, 'objectName':internal:metastore:///null,
'columns':[], 'partKeys':[], 'commandParams':[], 'actionType':OTHER,
'owner':hive}
````
elements={storage-type=internal:metastore; storage-url=/null; }
Why do we need to remove extra "/" after "metastore?
--
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]