pvary commented on code in PR #12637:
URL: https://github.com/apache/iceberg/pull/12637#discussion_r2013798052


##########
hive-metastore/src/test/java/org/apache/iceberg/hive/HiveMetastoreExtension.java:
##########
@@ -40,16 +40,10 @@ private HiveMetastoreExtension(String databaseName, 
Map<String, String> hiveConf
 
   @Override
   public void beforeAll(ExtensionContext extensionContext) throws Exception {
-    metastore = new TestHiveMetastore();
-    HiveConf hiveConfWithOverrides = new HiveConf(TestHiveMetastore.class);
-    if (hiveConfOverride != null) {
-      for (Map.Entry<String, String> kv : hiveConfOverride.entrySet()) {
-        hiveConfWithOverrides.set(kv.getKey(), kv.getValue());
-      }
-    }
+    metastore = new TestHiveMetastore(hiveConfOverride);
 
-    metastore.start(hiveConfWithOverrides);
-    metastoreClient = new HiveMetaStoreClient(hiveConfWithOverrides);
+    metastore.start(new HiveConf(TestHiveMetastore.class));
+    metastoreClient = new HiveMetaStoreClient(metastore.hiveConf());

Review Comment:
   I think the Spark issue still persists when the directSql is turned off, so 
we don't want to change that before talking to the owners of the test.
   
   Just create this method, and the old methods should use this:
   ```
     /**
      * Starts a TestHiveMetastore with a provided connection pool size and 
HiveConf.
      *
      * @param conf The hive configuration to use
      * @param poolSize The number of threads in the executor pool
      * @param directSql Used to turn on directSql
      */
     public void start(HiveConf conf, int poolSize, boolean directSql) {
   [..]
        initConf(conf, port, directSql);
   [..]
     }
   
     /**
      * Starts a TestHiveMetastore with a provided connection pool size and 
HiveConf.
      *
      * @param conf The hive configuration to use
      * @param poolSize The number of threads in the executor pool
      */
     public void start(HiveConf conf, int poolSize) {
       start(conf, poolSize, false);
     }
   ```



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to