Skip to content

Commit

Permalink
update to hive-metastore 4
Browse files Browse the repository at this point in the history
  • Loading branch information
Abacn committed Jan 27, 2025
1 parent 301b5ae commit 1e193b0
Show file tree
Hide file tree
Showing 3 changed files with 903 additions and 272 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.metastore.HMSHandler;
import org.apache.hadoop.hive.metastore.HMSHandlerProxyFactory;
import org.apache.hadoop.hive.metastore.IHMSHandler;
import org.apache.hadoop.hive.metastore.RetryingHMSHandler;
import org.apache.hadoop.hive.metastore.TSetIpAddressProcessor;
import org.apache.iceberg.common.DynConstructors;
import org.apache.iceberg.common.DynMethods;
Expand All @@ -58,7 +58,7 @@
* HiveMetastoreExtension} instead.
*
* <p>Copied over from <a
* href="https://github.com/apache/iceberg/blob/main/hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveMetastore.java">Iceberg's
* href="https://github.com/apache/hive/blob/branch-4.0/iceberg/iceberg-catalog/src/test/java/org/apache/iceberg/hive/TestHiveMetastore.java">Iceberg's
* integration testing util</a>
*/
public class TestHiveMetastore {
Expand All @@ -76,8 +76,8 @@ public class TestHiveMetastore {

private static final DynMethods.StaticMethod GET_BASE_HMS_HANDLER =
DynMethods.builder("getProxy")
.impl(RetryingHMSHandler.class, Configuration.class, IHMSHandler.class, boolean.class)
.impl(RetryingHMSHandler.class, HiveConf.class, IHMSHandler.class, boolean.class)
.impl(HMSHandlerProxyFactory.class, Configuration.class, IHMSHandler.class, boolean.class)
.impl(HMSHandlerProxyFactory.class, HiveConf.class, IHMSHandler.class, boolean.class)
.buildStatic();

private static final DynMethods.StaticMethod METASTORE_THREADS_SHUTDOWN =
Expand Down Expand Up @@ -262,7 +262,7 @@ private static void setupMetastoreDB(String dbURL) throws SQLException, IOExcept
ScriptRunner scriptRunner = new ScriptRunner(connection, true, true);

ClassLoader classLoader = ClassLoader.getSystemClassLoader();
InputStream inputStream = classLoader.getResourceAsStream("hive-schema-3.1.0.derby.sql");
InputStream inputStream = classLoader.getResourceAsStream("hive-schema-4.0.0.derby.sql");
try (Reader reader = new InputStreamReader(inputStream, StandardCharsets.UTF_8)) {
scriptRunner.runScript(reader);
}
Expand Down
267 changes: 0 additions & 267 deletions sdks/java/io/iceberg/src/test/resources/hive-schema-3.1.0.derby.sql

This file was deleted.

Loading

0 comments on commit 1e193b0

Please sign in to comment.