diff --git a/pom.xml b/pom.xml
index 0ce1fa77b4b5d..546e08f2c99f3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1468,7 +1468,7 @@
org.apache.thrift
libthrift
- 0.9.3-1
+ 0.14.1
org.apache.httpcomponents
@@ -1478,6 +1478,10 @@
org.apache.httpcomponents
httpclient
+
+ org.apache.tomcat.embed
+ tomcat-embed-core
+
diff --git a/presto-accumulo/pom.xml b/presto-accumulo/pom.xml
index 3099ab2369ebe..60563704da132 100644
--- a/presto-accumulo/pom.xml
+++ b/presto-accumulo/pom.xml
@@ -19,6 +19,17 @@
1.2.18.3
+
+
+
+ org.apache.thrift
+ libthrift
+
+ 0.9.3-1
+
+
+
+
org.apache.accumulo
diff --git a/presto-hive-metastore/src/main/java/com/facebook/presto/hive/metastore/thrift/Transport.java b/presto-hive-metastore/src/main/java/com/facebook/presto/hive/metastore/thrift/Transport.java
index 3ab0dafd5480e..ea75e9479828c 100644
--- a/presto-hive-metastore/src/main/java/com/facebook/presto/hive/metastore/thrift/Transport.java
+++ b/presto-hive-metastore/src/main/java/com/facebook/presto/hive/metastore/thrift/Transport.java
@@ -15,6 +15,7 @@
import com.facebook.presto.hive.authentication.HiveMetastoreAuthentication;
import com.google.common.net.HostAndPort;
+import org.apache.thrift.TConfiguration;
import org.apache.thrift.transport.TSocket;
import org.apache.thrift.transport.TTransport;
import org.apache.thrift.transport.TTransportException;
@@ -217,5 +218,26 @@ public void flush()
throw rewriteException(e, address);
}
}
+
+ // Methods added in libthrift 0.14.0 and not present in Hive Metastore <= 3.1.2
+ @Override
+ public TConfiguration getConfiguration()
+ {
+ return TConfiguration.DEFAULT;
+ }
+
+ @Override
+ public void updateKnownMessageSize(long size)
+ throws TTransportException
+ {
+ // noop: method added in libthrift 0.14.0 and not present in Hive Metastore <= 3.1.2
+ }
+
+ @Override
+ public void checkReadBytesAvailable(long numBytes)
+ throws TTransportException
+ {
+ // noop: method added in libthrift 0.14.0 and not present in Hive Metastore <= 3.1.2
+ }
}
}
diff --git a/presto-hive/src/main/java/com/facebook/presto/hive/authentication/KerberosHiveMetastoreAuthentication.java b/presto-hive/src/main/java/com/facebook/presto/hive/authentication/KerberosHiveMetastoreAuthentication.java
index 55ecd274da896..5d3d2840f11fb 100644
--- a/presto-hive/src/main/java/com/facebook/presto/hive/authentication/KerberosHiveMetastoreAuthentication.java
+++ b/presto-hive/src/main/java/com/facebook/presto/hive/authentication/KerberosHiveMetastoreAuthentication.java
@@ -15,6 +15,7 @@
import com.facebook.presto.hive.ForHiveMetastore;
import com.facebook.presto.hive.HiveClientConfig;
+import com.facebook.presto.spi.PrestoException;
import com.google.common.collect.ImmutableMap;
import org.apache.hadoop.hive.metastore.security.DelegationTokenIdentifier;
import org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport;
@@ -24,6 +25,7 @@
import org.apache.hadoop.security.token.TokenIdentifier;
import org.apache.thrift.transport.TSaslClientTransport;
import org.apache.thrift.transport.TTransport;
+import org.apache.thrift.transport.TTransportException;
import javax.inject.Inject;
import javax.security.auth.callback.Callback;
@@ -40,6 +42,7 @@
import java.util.Map;
import java.util.Optional;
+import static com.facebook.presto.hive.HiveErrorCode.HIVE_METASTORE_ERROR;
import static com.google.common.base.Preconditions.checkState;
import static java.util.Objects.requireNonNull;
import static javax.security.sasl.Sasl.QOP;
@@ -98,6 +101,9 @@ private TTransport authenticateWithToken(TTransport rawTransport, String tokenSt
catch (IOException ex) {
throw new UncheckedIOException(ex);
}
+ catch (TTransportException e) {
+ throw new PrestoException(HIVE_METASTORE_ERROR, e);
+ }
}
private static class SaslClientCallbackHandler
@@ -175,5 +181,8 @@ private TTransport authenticateWithHost(TTransport rawTransport, String hiveMeta
catch (IOException e) {
throw new UncheckedIOException(e);
}
+ catch (TTransportException e) {
+ throw new PrestoException(HIVE_METASTORE_ERROR, e);
+ }
}
}