Skip to content

Commit

Permalink
deps: updates to latest libthrift
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Cole <[email protected]>
  • Loading branch information
Adrian Cole committed Dec 11, 2023
1 parent 0563fc9 commit 67aeb6b
Show file tree
Hide file tree
Showing 16 changed files with 58 additions and 28 deletions.
16 changes: 12 additions & 4 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,19 @@ the following:

Before you do the first release of the year, move the SNAPSHOT version back and forth from whatever the current is.
In-between, re-apply the licenses.

Note: the command below is more complex than a normal project because this
project has a bom.
```bash
$ ./mvnw versions:set -DnewVersion=1.3.3-SNAPSHOT -DgenerateBackupPoms=false
$ ./mvnw com.mycila:license-maven-plugin:format
$ ./mvnw versions:set -DnewVersion=1.3.2-SNAPSHOT -DgenerateBackupPoms=false
$ git commit -am"Adjusts copyright headers for this year"
$ mvn=$PWD/mvnw
$ for p in ./bom .; do
(cd $p
$mvn versions:set -DnewVersion=2.17.1-SNAPSHOT -DgenerateBackupPoms=false
$mvn -o clean install -DskipTests
$mvn com.mycila:license-maven-plugin:format
$mvn versions:set -DnewVersion=2.17.0-SNAPSHOT -DgenerateBackupPoms=false)
done
$ git commit -asm"Adjusts copyright headers for this year"
```

## Manually releasing
Expand Down
2 changes: 1 addition & 1 deletion activemq-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<artifactId>zipkin-reporter-parent</artifactId>
<groupId>io.zipkin.reporter2</groupId>
<version>2.16.6-SNAPSHOT</version>
<version>2.17.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion amqp-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.zipkin.reporter2</groupId>
<artifactId>zipkin-reporter-parent</artifactId>
<version>2.16.6-SNAPSHOT</version>
<version>2.17.0-SNAPSHOT</version>
</parent>

<artifactId>zipkin-sender-amqp-client</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.zipkin.reporter2</groupId>
<artifactId>zipkin-reporter-parent</artifactId>
<version>2.16.6-SNAPSHOT</version>
<version>2.17.0-SNAPSHOT</version>
</parent>

<artifactId>benchmarks</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<groupId>io.zipkin.reporter2</groupId>
<artifactId>zipkin-reporter-bom</artifactId>
<name>Zipkin Reporter BOM</name>
<version>2.16.6-SNAPSHOT</version>
<version>2.17.0-SNAPSHOT</version>
<packaging>pom</packaging>
<description>Bill Of Materials POM for all Zipkin reporter artifacts</description>

Expand Down
2 changes: 1 addition & 1 deletion brave/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>io.zipkin.reporter2</groupId>
<artifactId>zipkin-reporter-parent</artifactId>
<version>2.16.6-SNAPSHOT</version>
<version>2.17.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.zipkin.reporter2</groupId>
<artifactId>zipkin-reporter-parent</artifactId>
<version>2.16.6-SNAPSHOT</version>
<version>2.17.0-SNAPSHOT</version>
</parent>

<artifactId>zipkin-reporter</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion kafka/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.zipkin.reporter2</groupId>
<artifactId>zipkin-reporter-parent</artifactId>
<version>2.16.6-SNAPSHOT</version>
<version>2.17.0-SNAPSHOT</version>
</parent>

<artifactId>zipkin-sender-kafka</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion kafka08/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.zipkin.reporter2</groupId>
<artifactId>zipkin-reporter-parent</artifactId>
<version>2.16.6-SNAPSHOT</version>
<version>2.17.0-SNAPSHOT</version>
</parent>

<artifactId>zipkin-sender-kafka08</artifactId>
Expand Down
10 changes: 7 additions & 3 deletions libthrift/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.zipkin.reporter2</groupId>
<artifactId>zipkin-reporter-parent</artifactId>
<version>2.16.6-SNAPSHOT</version>
<version>2.17.0-SNAPSHOT</version>
</parent>

<artifactId>zipkin-sender-libthrift</artifactId>
Expand All @@ -43,8 +43,12 @@
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
<!-- versions after this break compatability -->
<version>0.13.0</version>
<!-- Always update this to the highest value that doesn't break signature
compatability on patch release. Signature compatability breaks are
common in libthrift and lead to rev-lock. As scribe is a deprecated
transport in Zipkin, it is ok to update this to a signature breaking
version on minor, but increment to the next minor in the PR. -->
<version>0.19.0</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2019 The OpenZipkin Authors
* Copyright 2016-2023 The OpenZipkin Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
Expand All @@ -17,22 +17,30 @@
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.thrift.TConfiguration;
import org.apache.thrift.TException;
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.transport.TFramedTransport;
import org.apache.thrift.transport.TSocket;
import org.apache.thrift.transport.TTransportException;
import org.apache.thrift.transport.layered.TFramedTransport;

final class ScribeClient implements Closeable {
static final Logger logger = Logger.getLogger(ScribeClient.class.getName());
static final byte[] category = new byte[] {'z', 'i', 'p', 'k', 'i', 'n'};

final TSocket socket;
final TBinaryProtocol prot;
final String host;
final int port;
final int socketTimeout;
final int connectTimeout;

volatile TSocket socket;
volatile TBinaryProtocol prot;

ScribeClient(String host, int port, int socketTimeout, int connectTimeout) {
socket = new TSocket(host, port, socketTimeout, connectTimeout);
prot = new TBinaryProtocol(new TFramedTransport(socket));
this.host = host;
this.port = port;
this.socketTimeout = socketTimeout;
this.connectTimeout = connectTimeout;
}

static int messageSizeInBytes(int spanSizeInBytes) {
Expand All @@ -47,19 +55,29 @@ static int messageSizeInBytes(List<byte[]> encodedSpans) {

boolean log(List<byte[]> encodedSpans) throws TException {
try {
if (socket == null) {
synchronized (this) {
if (socket == null) {
socket = new TSocket(new TConfiguration(), host, port, socketTimeout, connectTimeout);
prot = new TBinaryProtocol(new TFramedTransport(socket));
}
}
}

if (!socket.isOpen()) socket.open();
InternalScribeCodec.writeLogRequest(category, encodedSpans, ++seqid_, prot);
prot.getTransport().flush();
return InternalScribeCodec.readLogResponse(seqid_, prot);
} catch (TTransportException e) {
logger.log(Level.FINE, "Transport exception. recreating socket", e);
socket.close();
close();
seqid_ = 0;
throw e;
}
}

@Override public void close() {
socket.close();
TSocket maybe = this.socket;
if (maybe != null) maybe.close();
}
}
2 changes: 1 addition & 1 deletion metrics-micrometer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.zipkin.reporter2</groupId>
<artifactId>zipkin-reporter-parent</artifactId>
<version>2.16.6-SNAPSHOT</version>
<version>2.17.0-SNAPSHOT</version>
</parent>

<artifactId>zipkin-reporter-metrics-micrometer</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion okhttp3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.zipkin.reporter2</groupId>
<artifactId>zipkin-reporter-parent</artifactId>
<version>2.16.6-SNAPSHOT</version>
<version>2.17.0-SNAPSHOT</version>
</parent>

<artifactId>zipkin-sender-okhttp3</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<groupId>io.zipkin.reporter2</groupId>
<artifactId>zipkin-reporter-parent</artifactId>
<version>2.16.6-SNAPSHOT</version>
<version>2.17.0-SNAPSHOT</version>
<packaging>pom</packaging>

<modules>
Expand Down
2 changes: 1 addition & 1 deletion spring-beans/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>io.zipkin.reporter2</groupId>
<artifactId>zipkin-reporter-parent</artifactId>
<version>2.16.6-SNAPSHOT</version>
<version>2.17.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion urlconnection/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.zipkin.reporter2</groupId>
<artifactId>zipkin-reporter-parent</artifactId>
<version>2.16.6-SNAPSHOT</version>
<version>2.17.0-SNAPSHOT</version>
</parent>

<artifactId>zipkin-sender-urlconnection</artifactId>
Expand Down

0 comments on commit 67aeb6b

Please sign in to comment.