Skip to content

Commit

Permalink
[FLINK-29709][Connector/Pulsar] Bump the Pulsar to latest 2.10.2 (apa…
Browse files Browse the repository at this point in the history
  • Loading branch information
syhily authored and dchristle committed Nov 18, 2022
1 parent 9c203aa commit 1397b5b
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 10 deletions.
9 changes: 8 additions & 1 deletion flink-connectors/flink-connector-pulsar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,14 @@ under the License.
<packaging>jar</packaging>

<properties>
<pulsar.version>2.10.1</pulsar.version>
<pulsar.version>2.10.2</pulsar.version>

<!-- Test Libraries -->
<protobuf-maven-plugin.version>0.6.1</protobuf-maven-plugin.version>
<os-maven-plugin.version>1.7.0</os-maven-plugin.version>
<pulsar-netty.version>4.1.77.Final</pulsar-netty.version>
<pulsar-grpc.version>1.45.1</pulsar-grpc.version>
<pulsar-caffeine.version>2.9.1</pulsar-caffeine.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -134,6 +135,12 @@ under the License.
<version>${pulsar.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
<version>${pulsar-caffeine.version}</version>
<scope>test</scope>
</dependency>

<!-- Add Pulsar 2.x as a dependency. -->
<!-- Move this to button for avoiding class conflicts with pulsar-broker. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ private void writeObject(ObjectOutputStream oos) throws IOException {
oos.writeUTF(entry.getKey());
oos.writeUTF(entry.getValue());
}

// Timestamp
oos.writeLong(schemaInfo.getTimestamp());
}

private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {
Expand All @@ -177,7 +180,17 @@ private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IO
properties.put(ois.readUTF(), ois.readUTF());
}

this.schemaInfo = new SchemaInfoImpl(name, schemaBytes, type, properties);
// Timestamp
long timestamp = ois.readLong();

this.schemaInfo =
SchemaInfoImpl.builder()
.name(name)
.schema(schemaBytes)
.type(type)
.properties(properties)
.timestamp(timestamp)
.build();
this.schema = createSchema(schemaInfo);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,13 @@ public static SchemaInfo encodeClassInfo(SchemaInfo schemaInfo, Class<?> typeCla
Map<String, String> properties = new HashMap<>(schemaInfo.getProperties());
properties.put(CLASS_INFO_PLACEHOLDER, typeClass.getName());

return new SchemaInfoImpl(
schemaInfo.getName(), schemaInfo.getSchema(), schemaInfo.getType(), properties);
return SchemaInfoImpl.builder()
.name(schemaInfo.getName())
.schema(schemaInfo.getSchema())
.type(schemaInfo.getType())
.properties(properties)
.timestamp(schemaInfo.getTimestamp())
.build();
}

@SuppressWarnings("unchecked")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ The Apache Software Foundation (http:https://www.apache.org/).

This project bundles the following dependencies under the Apache Software License 2.0 (http:https://www.apache.org/licenses/LICENSE-2.0.txt)

- org.apache.pulsar:bouncy-castle-bc:pkg:2.10.1
- org.apache.pulsar:pulsar-client-admin-api:2.10.1
- org.apache.pulsar:pulsar-client-all:2.10.1
- org.apache.pulsar:pulsar-client-api:2.10.1
- org.apache.pulsar:bouncy-castle-bc:pkg:2.10.2
- org.apache.pulsar:pulsar-client-admin-api:2.10.2
- org.apache.pulsar:pulsar-client-all:2.10.2
- org.apache.pulsar:pulsar-client-api:2.10.2
- org.slf4j:jul-to-slf4j:1.7.32

This project bundles the following dependencies under the Bouncy Castle license.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ under the License.
<name>Flink : E2E Tests : Pulsar</name>

<properties>
<pulsar.version>2.10.1</pulsar.version>
<pulsar.version>2.10.2</pulsar.version>
<bouncycastle.version>1.69</bouncycastle.version>
<jaxb-api.version>2.3.1</jaxb-api.version>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class DockerImageVersions {

public static final String LOCALSTACK = "localstack/localstack:0.13.3";

public static final String PULSAR = "apachepulsar/pulsar:2.10.1";
public static final String PULSAR = "apachepulsar/pulsar:2.10.2";

public static final String CASSANDRA_4_0 = "cassandra:4.0.3";

Expand Down

0 comments on commit 1397b5b

Please sign in to comment.