diff --git a/sdks/java/extensions/sql/hcatalog/build.gradle b/sdks/java/extensions/sql/hcatalog/build.gradle index e8abf21b7c3e..3945c2cfb424 100644 --- a/sdks/java/extensions/sql/hcatalog/build.gradle +++ b/sdks/java/extensions/sql/hcatalog/build.gradle @@ -25,8 +25,8 @@ applyJavaNature( ], ) -def hive_version = "3.1.3" -def netty_version = "4.1.51.Final" +def hive_version = "4.0.1" +def netty_version = "4.1.82.Final" // in sync with hive-exec's dependency /* * We need to rely on manually specifying these evaluationDependsOn to ensure that diff --git a/sdks/java/io/hcatalog/build.gradle b/sdks/java/io/hcatalog/build.gradle index d07904f3465e..10ba0e167352 100644 --- a/sdks/java/io/hcatalog/build.gradle +++ b/sdks/java/io/hcatalog/build.gradle @@ -38,7 +38,7 @@ def hadoopVersions = [ hadoopVersions.each {kv -> configurations.create("hadoopVersion$kv.key")} -def hive_version = "3.1.3" +def hive_version = "4.0.1" dependencies { implementation library.java.vendored_guava_32_1_2_jre diff --git a/sdks/java/io/hcatalog/src/test/java/org/apache/beam/sdk/io/hcatalog/test/EmbeddedMetastoreService.java b/sdks/java/io/hcatalog/src/test/java/org/apache/beam/sdk/io/hcatalog/test/EmbeddedMetastoreService.java index f68f969f29b9..1f0774a92c92 100644 --- a/sdks/java/io/hcatalog/src/test/java/org/apache/beam/sdk/io/hcatalog/test/EmbeddedMetastoreService.java +++ b/sdks/java/io/hcatalog/src/test/java/org/apache/beam/sdk/io/hcatalog/test/EmbeddedMetastoreService.java @@ -28,7 +28,7 @@ import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.ql.DriverFactory; import org.apache.hadoop.hive.ql.IDriver; -import org.apache.hadoop.hive.ql.processors.CommandProcessorResponse; +import org.apache.hadoop.hive.ql.processors.CommandProcessorException; import org.apache.hadoop.hive.ql.session.SessionState; /** @@ -58,11 +58,11 @@ public EmbeddedMetastoreService(String baseDirPath) throws IOException { String testWarehouseDirPath = makePathASafeFileName(testDataDirPath + "/warehouse"); hiveConf = new HiveConf(getClass()); - hiveConf.setVar(HiveConf.ConfVars.PREEXECHOOKS, ""); - hiveConf.setVar(HiveConf.ConfVars.POSTEXECHOOKS, ""); + hiveConf.setVar(HiveConf.ConfVars.PRE_EXEC_HOOKS, ""); + hiveConf.setVar(HiveConf.ConfVars.POST_EXEC_HOOKS, ""); hiveConf.setBoolVar(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY, false); - hiveConf.setVar(HiveConf.ConfVars.METASTOREWAREHOUSE, testWarehouseDirPath); - hiveConf.setBoolVar(HiveConf.ConfVars.HIVEOPTIMIZEMETADATAQUERIES, true); + hiveConf.setVar(HiveConf.ConfVars.METASTORE_WAREHOUSE, testWarehouseDirPath); + hiveConf.setBoolVar(HiveConf.ConfVars.HIVE_OPTIMIZE_METADATA_QUERIES, true); hiveConf.setVar( HiveConf.ConfVars.HIVE_AUTHORIZATION_MANAGER, "org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvider"); @@ -75,9 +75,10 @@ public EmbeddedMetastoreService(String baseDirPath) throws IOException { /** Executes the passed query on the embedded metastore service. */ public void executeQuery(String query) { - CommandProcessorResponse response = driver.run(query); - if (response.failed()) { - throw new RuntimeException(response.getException()); + try { + driver.run(query); + } catch (CommandProcessorException e) { + throw new RuntimeException(e); } } diff --git a/sdks/java/io/iceberg/build.gradle b/sdks/java/io/iceberg/build.gradle index d84205791d48..efd4e63c5868 100644 --- a/sdks/java/io/iceberg/build.gradle +++ b/sdks/java/io/iceberg/build.gradle @@ -40,7 +40,7 @@ hadoopVersions.each {kv -> configurations.create("hadoopVersion$kv.key")} def iceberg_version = "1.6.1" def parquet_version = "1.12.0" def orc_version = "1.9.2" -def hive_version = "3.1.3" +def hive_version = "4.0.1" dependencies { implementation library.java.vendored_guava_32_1_2_jre diff --git a/sdks/java/io/iceberg/hive/build.gradle b/sdks/java/io/iceberg/hive/build.gradle index 7d93a4026775..dabdc485f62f 100644 --- a/sdks/java/io/iceberg/hive/build.gradle +++ b/sdks/java/io/iceberg/hive/build.gradle @@ -1,5 +1,3 @@ -import groovy.json.JsonOutput - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -27,7 +25,7 @@ applyJavaNature( description = "Apache Beam :: SDKs :: Java :: IO :: Iceberg :: Hive" ext.summary = "Runtime dependencies needed for Hive catalog integration." -def hive_version = "3.1.3" +def hive_version = "4.0.1" def hbase_version = "2.6.1-hadoop3" def hadoop_version = "3.4.1" def iceberg_version = "1.6.1"