diff --git a/build.gradle b/build.gradle index 7adf0149..98761cc7 100644 --- a/build.gradle +++ b/build.gradle @@ -49,7 +49,7 @@ ext.versions = [ commons_lang3 : '3.3.2', commons_dbcp2 : '2.1', hive_jdbc : '0.13.1-5', - hive : '3.0.0-2', + hive : '4.0.1-1', presto : '0.181', reflections : '0.9.9', bytebuddy : '1.15.4', @@ -60,7 +60,7 @@ ext.versions = [ jackson : '2.4.4', cassandra : '4.19.2', commons_cli : '1.3.1', - thrift : '0.9.3', + thrift : '0.16.0', kafka : '3.9.0', ] diff --git a/tempto-core/src/main/java/io/prestodb/tempto/internal/fulfillment/table/hive/HiveThriftClient.java b/tempto-core/src/main/java/io/prestodb/tempto/internal/fulfillment/table/hive/HiveThriftClient.java index 4fe90175..31eb9877 100644 --- a/tempto-core/src/main/java/io/prestodb/tempto/internal/fulfillment/table/hive/HiveThriftClient.java +++ b/tempto-core/src/main/java/io/prestodb/tempto/internal/fulfillment/table/hive/HiveThriftClient.java @@ -25,6 +25,7 @@ import org.apache.hadoop.hive.metastore.api.DecimalColumnStatsData; import org.apache.hadoop.hive.metastore.api.DoubleColumnStatsData; import org.apache.hadoop.hive.metastore.api.FieldSchema; +import org.apache.hadoop.hive.metastore.api.GetTableRequest; import org.apache.hadoop.hive.metastore.api.LongColumnStatsData; import org.apache.hadoop.hive.metastore.api.StringColumnStatsData; import org.apache.hadoop.hive.metastore.api.Table; @@ -56,8 +57,8 @@ public class HiveThriftClient public HiveThriftClient(String thriftHost, int thriftPort) { - transport = new TSocket(thriftHost, thriftPort); try { + transport = new TSocket(thriftHost, thriftPort); transport.open(); } catch (TTransportException e) { @@ -70,7 +71,10 @@ public HiveThriftClient(String thriftHost, int thriftPort) void setStatistics(TableName tableName, TableStatistics tableStatistics) { try { - Table table = client.get_table(getSchema(tableName), tableName.getSchemalessNameInDatabase()); + GetTableRequest getTableRequest = new GetTableRequest( + getSchema(tableName), tableName.getSchemalessNameInDatabase()); + + Table table = client.get_table_req(getTableRequest).getTable(); setRowsCount(tableName, tableStatistics, table); try { setColumnStatistics(tableName, tableStatistics, table, fieldSchema -> true);