Skip to content

Commit

Permalink
Bump libthrift from 0.13.0 to 0.14.1 [PLPL-5984] (#6)
Browse files Browse the repository at this point in the history
* Bump libthrift from 0.13.0 to 0.14.0

Bumps [libthrift](https://github.com/apache/thrift) from 0.13.0 to 0.14.0.
- [Release notes](https://github.com/apache/thrift/releases)
- [Changelog](https://github.com/apache/thrift/blob/master/CHANGES.md)
- [Commits](apache/thrift@v0.13.0...v0.14.0)

Signed-off-by: dependabot[bot] <[email protected]>

* Bump version and fix new exception

* Bump thrift to 0.14.1

* Update docker image

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Chris Flaming <[email protected]>
  • Loading branch information
dependabot[bot] and Chris Flaming authored Apr 1, 2021
1 parent 44aba97 commit 4c1208b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ kind: Pod
spec:
containers:
- name: maven
image: registry.prod.factual.com/maven-with-thrift:0.2
image: registry.prod.factual.com/maven-with-thrift:0.14.1
command: ['cat']
tty: true
"""
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<groupId>com.factual</groupId>
<artifactId>haeinsa</artifactId>
<version>1.0.5.11-factual</version>
<version>1.0.5.12-factual</version>
<packaging>jar</packaging>

<name>haeinsa</name>
Expand Down Expand Up @@ -133,7 +133,7 @@
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
<version>0.13.0</version>
<version>0.14.1</version>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
Expand Down
11 changes: 6 additions & 5 deletions src/main/java/kr/co/vcnc/haeinsa/thrift/TRowLocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.apache.thrift.TSerializer;
import org.apache.thrift.protocol.TCompactProtocol;
import org.apache.thrift.protocol.TProtocolFactory;
import org.apache.thrift.transport.TTransportException;

/**
* Static class for TRowLock (Thrift class) Provide static method to
Expand All @@ -41,21 +42,21 @@ private TRowLocks() {}

private static final TProtocolFactory PROTOCOL_FACTORY = new TCompactProtocol.Factory();

private static TSerializer createSerializer() {
private static TSerializer createSerializer() throws TTransportException {
return new TSerializer(PROTOCOL_FACTORY);
}

private static TDeserializer createDeserializer() {
private static TDeserializer createDeserializer() throws TTransportException {
return new TDeserializer(PROTOCOL_FACTORY);
}

public static TRowLock deserialize(byte[] rowLockBytes) throws IOException {
if (rowLockBytes == null) {
return new TRowLock(ROW_LOCK_VERSION, TRowLockState.STABLE, Long.MIN_VALUE);
}
TRowLock rowLock = new TRowLock();
TDeserializer deserializer = createDeserializer();
try {
TRowLock rowLock = new TRowLock();
TDeserializer deserializer = createDeserializer();
deserializer.deserialize(rowLock, rowLockBytes);
return rowLock;
} catch (TException e) {
Expand All @@ -67,8 +68,8 @@ public static byte[] serialize(TRowLock rowLock) throws IOException {
if (rowLock.getCommitTimestamp() == Long.MIN_VALUE) {
return null;
}
TSerializer serializer = createSerializer();
try {
TSerializer serializer = createSerializer();
return serializer.serialize(rowLock);
} catch (TException e) {
throw new IOException(e.getMessage(), e);
Expand Down

0 comments on commit 4c1208b

Please sign in to comment.