rdblue commented on a change in pull request #1586:
URL: https://github.com/apache/iceberg/pull/1586#discussion_r509457751
##########
File path: hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java
##########
@@ -72,13 +72,19 @@ public HiveCatalog(Configuration conf) {
}
public HiveCatalog(String name, String uri, int clientPoolSize,
Configuration conf) {
+ this(name, uri, null, clientPoolSize, conf);
+ }
+
+ public HiveCatalog(String name, String uri, String warehouse, int
clientPoolSize, Configuration conf) {
this.name = name;
this.conf = new Configuration(conf);
// before building the client pool, overwrite the configuration's URIs if
the argument is non-null
if (uri != null) {
this.conf.set(HiveConf.ConfVars.METASTOREURIS.varname, uri);
}
-
+ if (warehouse != null) {
+ this.conf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname, warehouse);
Review comment:
Why not keep this location as a field in the `HiveCatalog` instead of
storing it in `conf`? Then the default logic would only need to be run once.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]