difin commented on code in PR #6292:
URL: https://github.com/apache/hive/pull/6292#discussion_r2784229232
##########
iceberg/iceberg-catalog/src/test/java/org/apache/iceberg/hive/TestHiveMetastore.java:
##########
@@ -195,6 +195,24 @@ public HiveConf hiveConf() {
return hiveConf;
}
+ /**
+ * Gets the actual connection URL used by the metastore handler.
+ * This is needed because hiveConf() returns the original conf passed to
start(),
+ * which may not have the connection URL that was set in the handler's
serverConf.
+ */
+ public String getConnectionURL() {
Review Comment:
> why not move to initConf
>
> ```
> MetastoreConf.setVar(conf, MetastoreConf.ConfVars.CONNECT_URL_KEY,
> "jdbc:derby:" + DERBY_PATH + ";create=true");
> ```
It doesn't work - when compaction command is analyzed it connects to the
default derby in-memory db.
It only works when this is added in
`HiveIcebergStorageHandlerWithEngineBase#executeConcurrently`
```
shell.setHiveSessionValue(HiveConf.ConfVars.METASTORE_CONNECT_URL_KEY.varname,
shell.metastore().getConnectionURL());
```
--
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]