This is an automated email from the ASF dual-hosted git repository. eolivelli pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/pulsar-adapters.git
The following commit(s) were added to refs/heads/master by this push: new 3350cb5 Update to Pulsar 2.11.0 (#40) 3350cb5 is described below commit 3350cb5cf002886f55fceb2a17b4d7912145e5e4 Author: Christophe Bornet <cbor...@hotmail.com> AuthorDate: Wed Mar 1 04:37:59 2023 -0400 Update to Pulsar 2.11.0 (#40) --- .github/workflows/ci-maven-cache-update.yaml | 4 +- .github/workflows/integration-test.yaml | 16 +++---- .github/workflows/unit-test.yaml | 4 +- README.md | 4 +- examples/kafka-streams/pom.xml | 4 +- examples/pom.xml | 2 +- examples/spark/pom.xml | 2 +- pom.xml | 52 ++++++++++++++++------ pulsar-client-kafka-compat/pom.xml | 5 ++- .../pulsar-client-kafka-shaded/pom.xml | 2 +- .../pulsar-client-kafka-shaded_0_8/pom.xml | 2 +- .../pulsar-client-kafka-shaded_0_9/pom.xml | 2 +- .../pulsar-client-kafka-tests/pom.xml | 2 +- .../pulsar-client-kafka-tests_0_8/pom.xml | 8 +++- .../pulsar-client-kafka-tests_0_9/pom.xml | 2 +- .../pulsar-client-kafka/pom.xml | 2 +- .../producer/PulsarCliebtKafkaConfigTest.java | 3 +- .../pulsar-client-kafka_0_8/pom.xml | 8 +++- .../clients/producer/PulsarKafkaProducerTest.java | 3 +- .../pulsar-client-kafka_0_9/pom.xml | 2 +- pulsar-log4j2-appender/pom.xml | 2 +- .../appender/PulsarAppenderClientConfTest.java | 3 +- pulsar-spark/pom.xml | 11 ++++- pulsar-storm/pom.xml | 2 +- tests/pom.xml | 2 +- tests/pulsar-kafka-compat-client-test/pom.xml | 2 +- tests/pulsar-spark-test/pom.xml | 19 +++++++- tests/pulsar-storm-test/pom.xml | 4 +- 28 files changed, 120 insertions(+), 54 deletions(-) diff --git a/.github/workflows/ci-maven-cache-update.yaml b/.github/workflows/ci-maven-cache-update.yaml index 517893b..ddc1647 100644 --- a/.github/workflows/ci-maven-cache-update.yaml +++ b/.github/workflows/ci-maven-cache-update.yaml @@ -89,12 +89,12 @@ jobs: # on growing from old entries which wouldn't never expire if the old # cache would be used as the starting point for a new cache entry - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v2 if: ${{ (github.event_name == 'schedule' || steps.changes.outputs.poms == 'true') && steps.cache.outputs.cache-hit != 'true' }} with: distribution: 'adopt' - java-version: 11 + java-version: 17 - name: Download dependencies if: ${{ (github.event_name == 'schedule' || steps.changes.outputs.poms == 'true') && steps.cache.outputs.cache-hit != 'true' }} diff --git a/.github/workflows/integration-test.yaml b/.github/workflows/integration-test.yaml index f1a9a51..b6616c0 100644 --- a/.github/workflows/integration-test.yaml +++ b/.github/workflows/integration-test.yaml @@ -64,28 +64,28 @@ jobs: restore-keys: | ${{ runner.os }}-m2-dependencies- - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v2 if: ${{ steps.check_changes.outputs.docs_only != 'true' }} with: distribution: 'adopt' - java-version: 11 + java-version: 17 - - name: install org.apache.pulsar.tests:integration:jar:tests:2.8.0 + - name: install org.apache.pulsar.tests:integration:jar:tests:2.11.0 if: ${{ steps.check_changes.outputs.docs_only != 'true' }} run: | cd ~ - git clone --depth 50 --single-branch --branch v2.8.0 https://github.com/apache/pulsar + git clone --depth 50 --single-branch --branch v2.11.0 https://github.com/apache/pulsar cd pulsar mvn -B -ntp -f tests/pom.xml -pl org.apache.pulsar.tests:tests-parent,org.apache.pulsar.tests:integration install - name: build apachepulsar/pulsar-test-latest-version:latest if: ${{ steps.check_changes.outputs.docs_only != 'true' }} run: | - docker pull apachepulsar/pulsar-all:2.8.0 - docker pull apachepulsar/pulsar:2.8.0 - docker tag apachepulsar/pulsar-all:2.8.0 apachepulsar/pulsar-all:latest - docker tag apachepulsar/pulsar:2.8.0 apachepulsar/pulsar:latest + docker pull apachepulsar/pulsar-all:2.11.0 + docker pull apachepulsar/pulsar:2.11.0 + docker tag apachepulsar/pulsar-all:2.11.0 apachepulsar/pulsar-all:latest + docker tag apachepulsar/pulsar:2.11.0 apachepulsar/pulsar:latest cd ~/pulsar mvn -B -ntp -f tests/docker-images/pom.xml install -pl org.apache.pulsar.tests:latest-version-image -am -Pdocker,-main -DskipTests diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/unit-test.yaml index 32141fc..f47226d 100644 --- a/.github/workflows/unit-test.yaml +++ b/.github/workflows/unit-test.yaml @@ -64,12 +64,12 @@ jobs: restore-keys: | ${{ runner.os }}-m2-dependencies- - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v2 if: ${{ steps.check_changes.outputs.docs_only != 'true' }} with: distribution: 'adopt' - java-version: 11 + java-version: 17 - name: run unit tests if: ${{ steps.check_changes.outputs.docs_only != 'true' }} diff --git a/README.md b/README.md index 3099f5d..3a72d9f 100644 --- a/README.md +++ b/README.md @@ -34,11 +34,11 @@ mvn install In order to build this repository the linked Pulsar release must be released to Maven Central other wise you have to build it locally. -For instance if this code depends on Pulsar 2.8.0 you have to build Pulsar 2.8.0 locally +For instance if this code depends on Pulsar 2.11.0 you have to build Pulsar 2.11.0 locally ``` git clone https://github.com/apache/pulsar -git checkout v2.8.0 +git checkout v2.11.0 mvn clean install -DskipTests ``` diff --git a/examples/kafka-streams/pom.xml b/examples/kafka-streams/pom.xml index fde2153..8d29916 100644 --- a/examples/kafka-streams/pom.xml +++ b/examples/kafka-streams/pom.xml @@ -24,7 +24,7 @@ <parent> <groupId>org.apache.pulsar.examples</groupId> <artifactId>pulsar-adapters-examples</artifactId> - <version>2.8.0-SNAPSHOT</version> + <version>2.11.0-SNAPSHOT</version> </parent> <artifactId>kafka-streams</artifactId> @@ -35,7 +35,7 @@ <dependency> <groupId>org.apache.pulsar</groupId> <artifactId>pulsar-client-kafka</artifactId> - <version>2.8.0-SNAPSHOT</version> + <version>2.11.0-SNAPSHOT</version> </dependency> <!-- Apache Kafka dependencies --> diff --git a/examples/pom.xml b/examples/pom.xml index f567c6b..45e99b8 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -25,7 +25,7 @@ <parent> <groupId>org.apache.pulsar</groupId> <artifactId>pulsar-adapters</artifactId> - <version>2.8.0-SNAPSHOT</version> + <version>2.11.0-SNAPSHOT</version> </parent> <groupId>org.apache.pulsar.examples</groupId> diff --git a/examples/spark/pom.xml b/examples/spark/pom.xml index 3195da8..667373a 100644 --- a/examples/spark/pom.xml +++ b/examples/spark/pom.xml @@ -25,7 +25,7 @@ <parent> <groupId>org.apache.pulsar.examples</groupId> <artifactId>pulsar-adapters-examples</artifactId> - <version>2.8.0-SNAPSHOT</version> + <version>2.11.0-SNAPSHOT</version> </parent> <artifactId>spark</artifactId> diff --git a/pom.xml b/pom.xml index 82266eb..3dde944 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ <groupId>org.apache.pulsar</groupId> <artifactId>pulsar-adapters</artifactId> - <version>2.8.0-SNAPSHOT</version> + <version>2.11.0-SNAPSHOT</version> <name>Pulsar Adapters</name> <description>A collections of Pulsar adapters.</description> @@ -76,12 +76,14 @@ </issueManagement> <properties> - <pulsar.version>2.8.0</pulsar.version> + <pulsar.version>2.11.0</pulsar.version> <storm.version>2.0.0</storm.version> <kafka-client.version>2.7.0</kafka-client.version> <kafka_0_8.version>0.8.1.1</kafka_0_8.version> <avro.version>1.10.2</avro.version> - <log4j2.version>2.17.1</log4j2.version> + <log4j.version>1.2.17</log4j.version> + <log4j2.version>2.18.0</log4j2.version> + <powermock.version>2.0.9</powermock.version> <lombok.version>1.18.20</lombok.version> <puppycrawl.checkstyle.version>8.37</puppycrawl.checkstyle.version> @@ -146,15 +148,6 @@ <dependencyManagement> <dependencies> - <!-- Can be removed when log4j2 version from Pulsar is 2.17+ --> - <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-bom</artifactId> - <version>${log4j2.version}</version> - <type>pom</type> - <scope>import</scope> - </dependency> - <dependency> <groupId>org.apache.pulsar</groupId> <artifactId>pulsar</artifactId> @@ -245,6 +238,18 @@ <version>${log4j2.version}</version> </dependency> + <dependency> + <artifactId>log4j</artifactId> + <groupId>log4j</groupId> + <version>${log4j.version}</version> + <exclusions> + <exclusion> + <groupId>com.sun.jmx</groupId> + <artifactId>jmxri</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> <groupId>org.apache.storm</groupId> <artifactId>storm-client</artifactId> @@ -278,6 +283,18 @@ <version>${avro.version}</version> </dependency> + <dependency> + <groupId>org.powermock</groupId> + <artifactId>powermock-api-mockito2</artifactId> + <version>${powermock.version}</version> + </dependency> + + <dependency> + <groupId>org.powermock</groupId> + <artifactId>powermock-module-testng</artifactId> + <version>${powermock.version}</version> + </dependency> + </dependencies> </dependencyManagement> @@ -854,7 +871,16 @@ <!-- see https://github.com/apache/pulsar/issues/8445 --> <maven.compiler.release>${maven.compiler.target}</maven.compiler.release> <!-- required for running tests on JDK11+ --> - <test.additional.args> --add-opens java.base/jdk.internal.loader=ALL-UNNAMED </test.additional.args> + <test.additional.args> + --add-opens java.base/jdk.internal.loader=ALL-UNNAMED + --add-opens java.base/java.lang=ALL-UNNAMED <!--Mockito--> + --add-opens java.base/java.io=ALL-UNNAMED <!--Bookkeeper NativeIO--> + --add-opens java.base/java.util=ALL-UNNAMED <!--System Lambda--> + --add-opens java.base/java.util.concurrent=ALL-UNNAMED <!--PowerMock--> + --add-opens java.base/sun.net=ALL-UNNAMED <!--netty.DnsResolverUtil--> + --add-opens java.management/sun.management=ALL-UNNAMED <!--JvmDefaultGCMetricsLogger & MBeanStatsGenerator--> + --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED <!--MBeanStatsGenerator--> + </test.additional.args> </properties> <build> <pluginManagement> diff --git a/pulsar-client-kafka-compat/pom.xml b/pulsar-client-kafka-compat/pom.xml index 9366247..d2c8b8a 100644 --- a/pulsar-client-kafka-compat/pom.xml +++ b/pulsar-client-kafka-compat/pom.xml @@ -27,12 +27,15 @@ <parent> <groupId>org.apache.pulsar</groupId> <artifactId>pulsar-adapters</artifactId> - <version>2.8.0-SNAPSHOT</version> + <version>2.11.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> <artifactId>pulsar-client-kafka-compat</artifactId> <name>Pulsar Kafka compatibility</name> + <properties> + <scala-library.version>2.9.2</scala-library.version> + </properties> <packaging>pom</packaging> diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka-shaded/pom.xml b/pulsar-client-kafka-compat/pulsar-client-kafka-shaded/pom.xml index 4d847ca..5d47d53 100644 --- a/pulsar-client-kafka-compat/pulsar-client-kafka-shaded/pom.xml +++ b/pulsar-client-kafka-compat/pulsar-client-kafka-shaded/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.apache.pulsar</groupId> <artifactId>pulsar-client-kafka-compat</artifactId> - <version>2.8.0-SNAPSHOT</version> + <version>2.11.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka-shaded_0_8/pom.xml b/pulsar-client-kafka-compat/pulsar-client-kafka-shaded_0_8/pom.xml index 4491549..c04a999 100644 --- a/pulsar-client-kafka-compat/pulsar-client-kafka-shaded_0_8/pom.xml +++ b/pulsar-client-kafka-compat/pulsar-client-kafka-shaded_0_8/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.apache.pulsar</groupId> <artifactId>pulsar-client-kafka-compat</artifactId> - <version>2.8.0-SNAPSHOT</version> + <version>2.11.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka-shaded_0_9/pom.xml b/pulsar-client-kafka-compat/pulsar-client-kafka-shaded_0_9/pom.xml index ab1246f..e100d8e 100644 --- a/pulsar-client-kafka-compat/pulsar-client-kafka-shaded_0_9/pom.xml +++ b/pulsar-client-kafka-compat/pulsar-client-kafka-shaded_0_9/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.apache.pulsar</groupId> <artifactId>pulsar-client-kafka-compat</artifactId> - <version>2.8.0-SNAPSHOT</version> + <version>2.11.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka-tests/pom.xml b/pulsar-client-kafka-compat/pulsar-client-kafka-tests/pom.xml index 651de12..098ca9f 100644 --- a/pulsar-client-kafka-compat/pulsar-client-kafka-tests/pom.xml +++ b/pulsar-client-kafka-compat/pulsar-client-kafka-tests/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.apache.pulsar</groupId> <artifactId>pulsar-client-kafka-compat</artifactId> - <version>2.8.0-SNAPSHOT</version> + <version>2.11.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka-tests_0_8/pom.xml b/pulsar-client-kafka-compat/pulsar-client-kafka-tests_0_8/pom.xml index 02f83d0..bb15d17 100644 --- a/pulsar-client-kafka-compat/pulsar-client-kafka-tests_0_8/pom.xml +++ b/pulsar-client-kafka-compat/pulsar-client-kafka-tests_0_8/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.apache.pulsar</groupId> <artifactId>pulsar-client-kafka-compat</artifactId> - <version>2.8.0-SNAPSHOT</version> + <version>2.11.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> @@ -43,6 +43,12 @@ <version>${project.version}</version> </dependency> + <dependency> + <groupId>org.scala-lang</groupId> + <artifactId>scala-library</artifactId> + <version>${scala-library.version}</version> + </dependency> + <dependency> <groupId>org.apache.pulsar</groupId> <artifactId>pulsar-broker</artifactId> diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka-tests_0_9/pom.xml b/pulsar-client-kafka-compat/pulsar-client-kafka-tests_0_9/pom.xml index 94cda84..e6dbcee 100644 --- a/pulsar-client-kafka-compat/pulsar-client-kafka-tests_0_9/pom.xml +++ b/pulsar-client-kafka-compat/pulsar-client-kafka-tests_0_9/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.apache.pulsar</groupId> <artifactId>pulsar-client-kafka-compat</artifactId> - <version>2.8.0-SNAPSHOT</version> + <version>2.11.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka/pom.xml b/pulsar-client-kafka-compat/pulsar-client-kafka/pom.xml index ba33c14..8667697 100644 --- a/pulsar-client-kafka-compat/pulsar-client-kafka/pom.xml +++ b/pulsar-client-kafka-compat/pulsar-client-kafka/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.apache.pulsar</groupId> <artifactId>pulsar-client-kafka-compat</artifactId> - <version>2.8.0-SNAPSHOT</version> + <version>2.11.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka/src/test/java/org/apache/kafka/clients/producer/PulsarCliebtKafkaConfigTest.java b/pulsar-client-kafka-compat/pulsar-client-kafka/src/test/java/org/apache/kafka/clients/producer/PulsarCliebtKafkaConfigTest.java index 5ddddf7..74e46f8 100644 --- a/pulsar-client-kafka-compat/pulsar-client-kafka/src/test/java/org/apache/kafka/clients/producer/PulsarCliebtKafkaConfigTest.java +++ b/pulsar-client-kafka-compat/pulsar-client-kafka/src/test/java/org/apache/kafka/clients/producer/PulsarCliebtKafkaConfigTest.java @@ -39,6 +39,7 @@ import org.apache.pulsar.client.api.ClientBuilder; import org.apache.pulsar.client.api.CryptoKeyReader; import org.apache.pulsar.client.api.ProducerBuilder; import org.apache.pulsar.client.api.PulsarClient; +import org.apache.pulsar.client.api.Schema; import org.apache.pulsar.client.impl.ConsumerBuilderImpl; import org.apache.pulsar.client.impl.DefaultCryptoKeyReader; import org.apache.pulsar.client.impl.ProducerBuilderImpl; @@ -88,7 +89,7 @@ public class PulsarCliebtKafkaConfigTest { properties.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, Arrays.asList("pulsar://localhost:6650")); properties.put(PulsarProducerKafkaConfig.CRYPTO_READER_FACTORY_CLASS_NAME, CryptoKeyReaderFactoryImpl.class.getName()); PulsarClient client = mock(PulsarClient.class); - ConsumerBuilderImpl<byte[]> consumerBuilder = new ConsumerBuilderImpl<>(null, null); + ConsumerBuilderImpl<byte[]> consumerBuilder = new ConsumerBuilderImpl<>(null, Schema.BYTES); doReturn(consumerBuilder).when(client).newConsumer(); PulsarConsumerKafkaConfig.getConsumerBuilder(client , properties); assertEquals(consumerBuilder.getConf().getCryptoKeyReader(), CryptoKeyReaderFactoryImpl.reader); diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka_0_8/pom.xml b/pulsar-client-kafka-compat/pulsar-client-kafka_0_8/pom.xml index db813f4..03557b1 100644 --- a/pulsar-client-kafka-compat/pulsar-client-kafka_0_8/pom.xml +++ b/pulsar-client-kafka-compat/pulsar-client-kafka_0_8/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.apache.pulsar</groupId> <artifactId>pulsar-client-kafka-compat</artifactId> - <version>2.8.0-SNAPSHOT</version> + <version>2.11.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> @@ -123,6 +123,12 @@ </exclusions> </dependency> + <dependency> + <groupId>org.scala-lang</groupId> + <artifactId>scala-library</artifactId> + <version>${scala-library.version}</version> + </dependency> + <dependency> <artifactId>log4j</artifactId> <groupId>log4j</groupId> diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka_0_8/src/test/java/org/apache/kafka/clients/producer/PulsarKafkaProducerTest.java b/pulsar-client-kafka-compat/pulsar-client-kafka_0_8/src/test/java/org/apache/kafka/clients/producer/PulsarKafkaProducerTest.java index 4cccf83..2d4f3aa 100644 --- a/pulsar-client-kafka-compat/pulsar-client-kafka_0_8/src/test/java/org/apache/kafka/clients/producer/PulsarKafkaProducerTest.java +++ b/pulsar-client-kafka-compat/pulsar-client-kafka_0_8/src/test/java/org/apache/kafka/clients/producer/PulsarKafkaProducerTest.java @@ -59,10 +59,9 @@ public class PulsarKafkaProducerTest { Field field = ProducerBuilderImpl.class.getDeclaredField("conf"); field.setAccessible(true); ProducerConfigurationData conf = (ProducerConfigurationData) field.get(producerBuilder); - System.out.println("getMaxPendingMessages= " + conf.getMaxPendingMessages()); assertEquals(conf.getCompressionType(), CompressionType.NONE); assertEquals(conf.isBlockIfQueueFull(), true); - assertEquals(conf.getMaxPendingMessages(), 1000); + assertEquals(conf.getMaxPendingMessages(), 0); assertEquals(conf.getBatchingMaxPublishDelayMicros(), TimeUnit.MILLISECONDS.toMicros(1)); assertEquals(conf.getBatchingMaxMessages(), 1000); } diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka_0_9/pom.xml b/pulsar-client-kafka-compat/pulsar-client-kafka_0_9/pom.xml index 9ed32a3..c4e9b15 100644 --- a/pulsar-client-kafka-compat/pulsar-client-kafka_0_9/pom.xml +++ b/pulsar-client-kafka-compat/pulsar-client-kafka_0_9/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.apache.pulsar</groupId> <artifactId>pulsar-client-kafka-compat</artifactId> - <version>2.8.0-SNAPSHOT</version> + <version>2.11.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/pulsar-log4j2-appender/pom.xml b/pulsar-log4j2-appender/pom.xml index 6d8f1a8..b55fca7 100644 --- a/pulsar-log4j2-appender/pom.xml +++ b/pulsar-log4j2-appender/pom.xml @@ -24,7 +24,7 @@ <parent> <groupId>org.apache.pulsar</groupId> <artifactId>pulsar-adapters</artifactId> - <version>2.8.0-SNAPSHOT</version> + <version>2.11.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/pulsar-log4j2-appender/src/test/java/org/apache/pulsar/log4j2/appender/PulsarAppenderClientConfTest.java b/pulsar-log4j2-appender/src/test/java/org/apache/pulsar/log4j2/appender/PulsarAppenderClientConfTest.java index 0cf25b3..841bdd7 100644 --- a/pulsar-log4j2-appender/src/test/java/org/apache/pulsar/log4j2/appender/PulsarAppenderClientConfTest.java +++ b/pulsar-log4j2-appender/src/test/java/org/apache/pulsar/log4j2/appender/PulsarAppenderClientConfTest.java @@ -62,7 +62,8 @@ public class PulsarAppenderClientConfTest extends AbstractPulsarAppenderTest { assertTrue(authData.hasDataForHttp()); Map<String, String> headers = authData.getHttpHeaders().stream().collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); - assertEquals(headers.size(), 1); + assertEquals(headers.size(), 2); + assertEquals(headers.get("X-Pulsar-Auth-Method-Name"), "token"); assertEquals(headers.get("Authorization"), "Bearer TOKEN"); // verify tlsAllowInsecureConnection diff --git a/pulsar-spark/pom.xml b/pulsar-spark/pom.xml index 3736168..f10b167 100644 --- a/pulsar-spark/pom.xml +++ b/pulsar-spark/pom.xml @@ -26,12 +26,15 @@ <parent> <groupId>org.apache.pulsar</groupId> <artifactId>pulsar-adapters</artifactId> - <version>2.8.0-SNAPSHOT</version> + <version>2.11.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> <artifactId>pulsar-spark</artifactId> <name>Spark Streaming Pulsar Receivers</name> + <properties> + <scala-library.version>2.11.12</scala-library.version> + </properties> <dependencies> @@ -62,6 +65,12 @@ </exclusions> </dependency> + <dependency> + <groupId>org.scala-lang</groupId> + <artifactId>scala-library</artifactId> + <version>${scala-library.version}</version> + </dependency> + <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> diff --git a/pulsar-storm/pom.xml b/pulsar-storm/pom.xml index 03268cc..a20649b 100644 --- a/pulsar-storm/pom.xml +++ b/pulsar-storm/pom.xml @@ -26,7 +26,7 @@ <parent> <groupId>org.apache.pulsar</groupId> <artifactId>pulsar-adapters</artifactId> - <version>2.8.0-SNAPSHOT</version> + <version>2.11.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/tests/pom.xml b/tests/pom.xml index 2bb8f54..91b3416 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -26,7 +26,7 @@ <parent> <groupId>org.apache.pulsar</groupId> <artifactId>pulsar-adapters</artifactId> - <version>2.8.0-SNAPSHOT</version> + <version>2.11.0-SNAPSHOT</version> </parent> <groupId>org.apache.pulsar.tests</groupId> <artifactId>adapters-tests-parent</artifactId> diff --git a/tests/pulsar-kafka-compat-client-test/pom.xml b/tests/pulsar-kafka-compat-client-test/pom.xml index 9fe9fa6..1a9095c 100644 --- a/tests/pulsar-kafka-compat-client-test/pom.xml +++ b/tests/pulsar-kafka-compat-client-test/pom.xml @@ -25,7 +25,7 @@ <parent> <groupId>org.apache.pulsar.tests</groupId> <artifactId>adapters-tests-parent</artifactId> - <version>2.8.0-SNAPSHOT</version> + <version>2.11.0-SNAPSHOT</version> </parent> <artifactId>pulsar-kafka-compat-client-test</artifactId> diff --git a/tests/pulsar-spark-test/pom.xml b/tests/pulsar-spark-test/pom.xml index 50b6d7d..7078978 100644 --- a/tests/pulsar-spark-test/pom.xml +++ b/tests/pulsar-spark-test/pom.xml @@ -26,19 +26,22 @@ <parent> <groupId>org.apache.pulsar.tests</groupId> <artifactId>adapters-tests-parent</artifactId> - <version>2.8.0-SNAPSHOT</version> + <version>2.11.0-SNAPSHOT</version> </parent> <artifactId>pulsar-spark-test</artifactId> <packaging>jar</packaging> <name>Spark Streaming Pulsar Receivers Tests</name> + <properties> + <scala-library.version>2.11.12</scala-library.version> + </properties> <dependencies> <dependency> <groupId>org.apache.pulsar</groupId> <artifactId>pulsar-spark</artifactId> - <version>2.8.0-SNAPSHOT</version> + <version>2.11.0-SNAPSHOT</version> <scope>test</scope> </dependency> @@ -49,6 +52,12 @@ <scope>test</scope> </dependency> + <dependency> + <groupId>org.apache.pulsar</groupId> + <artifactId>pulsar-client-admin</artifactId> + <scope>test</scope> + </dependency> + <dependency> <groupId>org.testcontainers</groupId> <artifactId>mysql</artifactId> @@ -61,6 +70,12 @@ <scope>test</scope> </dependency> + <dependency> + <groupId>org.scala-lang</groupId> + <artifactId>scala-library</artifactId> + <version>${scala-library.version}</version> + </dependency> + <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> diff --git a/tests/pulsar-storm-test/pom.xml b/tests/pulsar-storm-test/pom.xml index 04d5204..3134328 100644 --- a/tests/pulsar-storm-test/pom.xml +++ b/tests/pulsar-storm-test/pom.xml @@ -26,7 +26,7 @@ <parent> <groupId>org.apache.pulsar.tests</groupId> <artifactId>adapters-tests-parent</artifactId> - <version>2.8.0-SNAPSHOT</version> + <version>2.11.0-SNAPSHOT</version> </parent> <artifactId>pulsar-storm-test</artifactId> @@ -38,7 +38,7 @@ <dependency> <groupId>org.apache.pulsar</groupId> <artifactId>pulsar-storm</artifactId> - <version>2.8.0-SNAPSHOT</version> + <version>2.11.0-SNAPSHOT</version> <scope>test</scope> <exclusions> <exclusion>