Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Thrift library (testing phase) #305

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<jackson.databind.version>2.9.10.8</jackson.databind.version>
<curator.version>2.13.0</curator.version>
<joda-time.version>2.9.9</joda-time.version>
<thrift.version>0.19.0</thrift.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -310,6 +311,11 @@
<artifactId>joda-time</artifactId>
<version>${joda-time.version}</version>
</dependency>
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
<version>${thrift.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@
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;
import org.apache.thrift.protocol.TProtocol;
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;

Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down
Loading