From 52a0e475aa9dbfc1b1ed0a2e0770f8994c183c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20Rovill=C3=A9?= Date: Thu, 25 Mar 2021 19:35:38 +0100 Subject: [PATCH] HIVE-23980 Shade guava from existing Hive versions --- .../java/org/apache/hadoop/hive/ql/log/PerfLogger.java | 4 ++-- itests/qtest-accumulo/pom.xml | 10 ++-------- itests/qtest-spark/pom.xml | 6 ++++++ ql/pom.xml | 10 ++++++++++ .../java/org/apache/hadoop/hive/ql/QueryDisplay.java | 7 +++---- 5 files changed, 23 insertions(+), 14 deletions(-) diff --git a/common/src/java/org/apache/hadoop/hive/ql/log/PerfLogger.java b/common/src/java/org/apache/hadoop/hive/ql/log/PerfLogger.java index 7f3c8b312d8a..fcca7f40e1ff 100644 --- a/common/src/java/org/apache/hadoop/hive/ql/log/PerfLogger.java +++ b/common/src/java/org/apache/hadoop/hive/ql/log/PerfLogger.java @@ -207,11 +207,11 @@ public Long getDuration(String method) { } - public ImmutableMap getStartTimes() { + public Map getStartTimes() { return ImmutableMap.copyOf(startTimes); } - public ImmutableMap getEndTimes() { + public Map getEndTimes() { return ImmutableMap.copyOf(endTimes); } diff --git a/itests/qtest-accumulo/pom.xml b/itests/qtest-accumulo/pom.xml index b34aa7da63da..7c132392b93e 100644 --- a/itests/qtest-accumulo/pom.xml +++ b/itests/qtest-accumulo/pom.xml @@ -56,12 +56,6 @@ hive-contrib ${project.version} test - - - org.apache.hive - hive-exec - - org.apache.hive @@ -89,8 +83,8 @@ test - org.apache.hive - hive-exec + org.apache.calcite + calcite-core diff --git a/itests/qtest-spark/pom.xml b/itests/qtest-spark/pom.xml index 494a36b716b5..578098f52164 100644 --- a/itests/qtest-spark/pom.xml +++ b/itests/qtest-spark/pom.xml @@ -138,6 +138,12 @@ hive-it-util ${project.version} test + + + org.apache.calcite + calcite-core + + org.apache.hive diff --git a/ql/pom.xml b/ql/pom.xml index 9d54480b1440..5c8cd4b7447e 100644 --- a/ql/pom.xml +++ b/ql/pom.xml @@ -878,6 +878,8 @@ org.apache.orc:orc-core org.apache.orc:orc-tools joda-time:joda-time + org.apache.calcite:* + org.apache.calcite.avatica:avatica @@ -889,6 +891,14 @@ org.objenesis org.apache.hive.org.objenesis + + com.google.common + org.apache.hive.com.google.common + + + com.google.thirdparty.publicsuffix + org.apache.hive.com.google.thirdparty.publicsuffix + diff --git a/ql/src/java/org/apache/hadoop/hive/ql/QueryDisplay.java b/ql/src/java/org/apache/hadoop/hive/ql/QueryDisplay.java index cf93b6a0c487..82075b3db9e8 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/QueryDisplay.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/QueryDisplay.java @@ -17,7 +17,6 @@ */ package org.apache.hadoop.hive.ql; -import com.google.common.collect.ImmutableMap; import org.apache.hadoop.hive.common.LogUtils; import org.apache.hadoop.hive.ql.exec.Task; import org.apache.hadoop.hive.ql.exec.TaskResult; @@ -308,7 +307,7 @@ public synchronized Map getHmsTimings(Phase phase) { * @param phase phase of query * @param hmsTimings map of HMS Client method-calls and duration in miliseconds, during given phase. */ - public synchronized void setHmsTimings(Phase phase, ImmutableMap hmsTimings) { + public synchronized void setHmsTimings(Phase phase, Map hmsTimings) { hmsTimingMap.put(phase, hmsTimings); } @@ -324,7 +323,7 @@ public synchronized Map getPerfLogStarts(Phase phase) { * @param phase phase of query * @param perfLogStarts map of PerfLogger call-trace name and start time in miliseconds, during given phase. */ - public synchronized void setPerfLogStarts(Phase phase, ImmutableMap perfLogStarts) { + public synchronized void setPerfLogStarts(Phase phase, Map perfLogStarts) { perfLogStartMap.put(phase, perfLogStarts); } @@ -340,7 +339,7 @@ public synchronized Map getPerfLogEnds(Phase phase) { * @param phase phase of query * @param perfLogEnds map of PerfLogger call-trace name and end time in miliseconds, during given phase. */ - public synchronized void setPerfLogEnds(Phase phase, ImmutableMap perfLogEnds) { + public synchronized void setPerfLogEnds(Phase phase, Map perfLogEnds) { perfLogEndMap.put(phase, perfLogEnds); }