Skip to content

Commit

Permalink
Upgrade to hive 4.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Abacn committed Jan 23, 2025
1 parent fa0152b commit 768711e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
4 changes: 2 additions & 2 deletions sdks/java/extensions/sql/hcatalog/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sdks/java/io/hcatalog/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -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");
Expand All @@ -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);
}
}

Expand Down
2 changes: 1 addition & 1 deletion sdks/java/io/iceberg/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions sdks/java/io/iceberg/hive/build.gradle
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 768711e

Please sign in to comment.