diff --git a/pom.xml b/pom.xml index 56ecc51c1..2d268619a 100644 --- a/pom.xml +++ b/pom.xml @@ -53,6 +53,7 @@ 2.9.10.8 2.13.0 2.9.9 + 0.19.0 @@ -310,6 +311,11 @@ joda-time ${joda-time.version} + + org.apache.thrift + libthrift + ${thrift.version} + diff --git a/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/client/ThriftMetastoreClientManager.java b/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/client/ThriftMetastoreClientManager.java index c20c87cfd..dcbdcff72 100644 --- a/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/client/ThriftMetastoreClientManager.java +++ b/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/client/ThriftMetastoreClientManager.java @@ -32,6 +32,7 @@ import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.util.StringUtils; import org.apache.hive.service.auth.KerberosSaslHelper; +import org.apache.thrift.TConfiguration; import org.apache.thrift.TException; import org.apache.thrift.protocol.TBinaryProtocol; import org.apache.thrift.protocol.TCompactProtocol; @@ -39,6 +40,7 @@ import org.apache.thrift.transport.TFramedTransport; import org.apache.thrift.transport.TSocket; import org.apache.thrift.transport.TTransport; +import org.apache.thrift.transport.TTransportException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -123,7 +125,7 @@ void open(HiveUgiArgs ugiArgs) { for (URI store : metastoreUris) { LOG.info("Trying to connect to metastore with URI " + store); try { - transport = new TSocket(store.getHost(), store.getPort(), clientSocketTimeout, connectionTimeout); + transport = new TSocket(new TConfiguration(), store.getHost(), store.getPort(), clientSocketTimeout, connectionTimeout); if (useSasl) { // Wrap thrift connection with SASL for secure connection. try { @@ -186,7 +188,7 @@ void open(HiveUgiArgs ugiArgs) { LOG.warn("Failed to connect to the MetaStore Server, URI " + store); } } - } catch (MetaException e) { + } catch (MetaException | TTransportException e) { LOG.error("Unable to connect to metastore with URI " + store + " in attempt " + attempt, e); } if (isConnected) { diff --git a/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/server/MetaStoreProxyServer.java b/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/server/MetaStoreProxyServer.java index b4ed5c8d5..235c1606d 100644 --- a/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/server/MetaStoreProxyServer.java +++ b/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/server/MetaStoreProxyServer.java @@ -187,9 +187,7 @@ private void startWaggleDance( .protocolFactory(new TBinaryProtocol.Factory()) .minWorkerThreads(minWorkerThreads) .maxWorkerThreads(maxWorkerThreads) - .stopTimeoutVal(waggleDanceConfiguration.getThriftServerStopTimeoutValInSeconds()) - .requestTimeout(waggleDanceConfiguration.getThriftServerRequestTimeout()) - .requestTimeoutUnit(waggleDanceConfiguration.getThriftServerRequestTimeoutUnit()); + .stopTimeoutVal(waggleDanceConfiguration.getThriftServerStopTimeoutValInSeconds()); tServer = new TThreadPoolServer(args); if (useSASL){