wypoon commented on code in PR #12721:
URL: https://github.com/apache/iceberg/pull/12721#discussion_r2035551559


##########
hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveMetastore.java:
##########
@@ -273,24 +275,24 @@ private TServer newThriftServer(TServerSocket socket, int 
poolSize, HiveConf con
   }
 
   private void initConf(HiveConf conf, int port, boolean directSql) {
-    conf.set(HiveConf.ConfVars.METASTOREURIS.varname, "thrift://localhost:" + 
port);
-    conf.set(
-        HiveConf.ConfVars.METASTOREWAREHOUSE.varname, "file:" + 
HIVE_LOCAL_DIR.getAbsolutePath());
-    conf.set(HiveConf.ConfVars.METASTORE_TRY_DIRECT_SQL.varname, 
String.valueOf(directSql));
-    
conf.set(HiveConf.ConfVars.METASTORE_DISALLOW_INCOMPATIBLE_COL_TYPE_CHANGES.varname,
 "false");
+    conf.set("hive.metastore.uris", "thrift://localhost:" + port);
+    conf.set("hive.metastore.warehouse.dir", "file:" + 
HIVE_LOCAL_DIR.getAbsolutePath());
+    conf.set("hive.metastore.try.direct.sql", String.valueOf(directSql));
+    conf.set("hive.metastore.disallow.incompatible.col.type.changes", "false");
     conf.set("iceberg.hive.client-pool-size", "2");
     // Setting this to avoid thrift exception during running Iceberg tests 
outside Iceberg.
-    conf.set(
-        HiveConf.ConfVars.HIVE_IN_TEST.varname, 
HiveConf.ConfVars.HIVE_IN_TEST.getDefaultValue());
+    conf.set("hive.in.test", "false");
   }
 
   private static void setupMetastoreDB(String dbURL) throws SQLException, 
IOException {
     try (Connection connection = DriverManager.getConnection(dbURL)) {
       ScriptRunner scriptRunner = new ScriptRunner(connection, true, true);
+      String resource =
+          (HiveVersion.current() == HiveVersion.HIVE_4)
+              ? "hive-schema-4.0.0.derby.sql"
+              : "hive-schema-3.1.0.derby.sql";

Review Comment:
   Yes, I'll add a comment. I think I pointed this out in a comment on 
https://github.com/apache/iceberg/pull/12681 (but not in the code).



-- 
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