diff --git a/distribution/server/src/assemble/LICENSE.bin.txt b/distribution/server/src/assemble/LICENSE.bin.txt
index 675466b4f4303..20d311bed9810 100644
--- a/distribution/server/src/assemble/LICENSE.bin.txt
+++ b/distribution/server/src/assemble/LICENSE.bin.txt
@@ -246,17 +246,17 @@ The Apache Software License, Version 2.0
* JCommander -- com.beust-jcommander-1.82.jar
* High Performance Primitive Collections for Java -- com.carrotsearch-hppc-0.9.1.jar
* Jackson
- - com.fasterxml.jackson.core-jackson-annotations-2.14.2.jar
- - com.fasterxml.jackson.core-jackson-core-2.14.2.jar
- - com.fasterxml.jackson.core-jackson-databind-2.14.2.jar
- - com.fasterxml.jackson.dataformat-jackson-dataformat-yaml-2.14.2.jar
- - com.fasterxml.jackson.jaxrs-jackson-jaxrs-base-2.14.2.jar
- - com.fasterxml.jackson.jaxrs-jackson-jaxrs-json-provider-2.14.2.jar
- - com.fasterxml.jackson.module-jackson-module-jaxb-annotations-2.14.2.jar
- - com.fasterxml.jackson.module-jackson-module-jsonSchema-2.14.2.jar
- - com.fasterxml.jackson.datatype-jackson-datatype-jdk8-2.14.2.jar
- - com.fasterxml.jackson.datatype-jackson-datatype-jsr310-2.14.2.jar
- - com.fasterxml.jackson.module-jackson-module-parameter-names-2.14.2.jar
+ - com.fasterxml.jackson.core-jackson-annotations-2.16.0.jar
+ - com.fasterxml.jackson.core-jackson-core-2.16.0.jar
+ - com.fasterxml.jackson.core-jackson-databind-2.16.0.jar
+ - com.fasterxml.jackson.dataformat-jackson-dataformat-yaml-2.16.0.jar
+ - com.fasterxml.jackson.jaxrs-jackson-jaxrs-base-2.16.0.jar
+ - com.fasterxml.jackson.jaxrs-jackson-jaxrs-json-provider-2.16.0.jar
+ - com.fasterxml.jackson.module-jackson-module-jaxb-annotations-2.16.0.jar
+ - com.fasterxml.jackson.module-jackson-module-jsonSchema-2.16.0.jar
+ - com.fasterxml.jackson.datatype-jackson-datatype-jdk8-2.16.0.jar
+ - com.fasterxml.jackson.datatype-jackson-datatype-jsr310-2.16.0.jar
+ - com.fasterxml.jackson.module-jackson-module-parameter-names-2.16.0.jar
* Caffeine -- com.github.ben-manes.caffeine-caffeine-2.9.1.jar
* Conscrypt -- org.conscrypt-conscrypt-openjdk-uber-2.5.2.jar
* Proto Google Common Protos -- com.google.api.grpc-proto-google-common-protos-2.9.0.jar
diff --git a/distribution/shell/src/assemble/LICENSE.bin.txt b/distribution/shell/src/assemble/LICENSE.bin.txt
index d19d4473c41cc..d3fb337decf13 100644
--- a/distribution/shell/src/assemble/LICENSE.bin.txt
+++ b/distribution/shell/src/assemble/LICENSE.bin.txt
@@ -311,17 +311,17 @@ This projects includes binary packages with the following licenses:
The Apache Software License, Version 2.0
* JCommander -- jcommander-1.82.jar
* Jackson
- - jackson-annotations-2.14.2.jar
- - jackson-core-2.14.2.jar
- - jackson-databind-2.14.2.jar
- - jackson-dataformat-yaml-2.14.2.jar
- - jackson-jaxrs-base-2.14.2.jar
- - jackson-jaxrs-json-provider-2.14.2.jar
- - jackson-module-jaxb-annotations-2.14.2.jar
- - jackson-module-jsonSchema-2.14.2.jar
- - jackson-datatype-jdk8-2.14.2.jar
- - jackson-datatype-jsr310-2.14.2.jar
- - jackson-module-parameter-names-2.14.2.jar
+ - jackson-annotations-2.16.0.jar
+ - jackson-core-2.16.0.jar
+ - jackson-databind-2.16.0.jar
+ - jackson-dataformat-yaml-2.16.0.jar
+ - jackson-jaxrs-base-2.16.0.jar
+ - jackson-jaxrs-json-provider-2.16.0.jar
+ - jackson-module-jaxb-annotations-2.16.0.jar
+ - jackson-module-jsonSchema-2.16.0.jar
+ - jackson-datatype-jdk8-2.16.0.jar
+ - jackson-datatype-jsr310-2.16.0.jar
+ - jackson-module-parameter-names-2.16.0.jar
* Conscrypt -- conscrypt-openjdk-uber-2.5.2.jar
* Gson
- gson-2.8.9.jar
diff --git a/pom.xml b/pom.xml
index 8160dc870b355..16fa61eb6dccb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -158,7 +158,7 @@ flexible messaging model and an intuitive client API.
1.78.1
1.0.7
1.0.2.5
- 2.14.2
+ 2.16.0
0.10.2
1.6.2
10.14.2
@@ -194,7 +194,7 @@ flexible messaging model and an intuitive client API.
0.4.4-hotfix1
3.3.5
2.4.10
- 1.2.4
+ 2.16.0
8.12.1
368
2.6.1.Final
diff --git a/pulsar-common/src/main/java/org/apache/pulsar/common/util/FieldParser.java b/pulsar-common/src/main/java/org/apache/pulsar/common/util/FieldParser.java
index 8d1ae5294ff7b..530bbcd8edb52 100644
--- a/pulsar-common/src/main/java/org/apache/pulsar/common/util/FieldParser.java
+++ b/pulsar-common/src/main/java/org/apache/pulsar/common/util/FieldParser.java
@@ -21,8 +21,8 @@
import static com.google.common.base.Preconditions.checkArgument;
import static java.lang.String.format;
import static java.util.Objects.requireNonNull;
-import com.fasterxml.jackson.databind.AnnotationIntrospector;
-import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector;
+import com.fasterxml.jackson.databind.DeserializationConfig;
+import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.util.EnumResolver;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
@@ -58,7 +58,7 @@ public final class FieldParser {
private static final Map CONVERTERS = new HashMap<>();
private static final Map, Class>> WRAPPER_TYPES = new HashMap<>();
- private static final AnnotationIntrospector ANNOTATION_INTROSPECTOR = new JacksonAnnotationIntrospector();
+ private static final DeserializationConfig DESERIALIZATION_CONFIG = new ObjectMapper().getDeserializationConfig();
static {
// Preload converters and wrapperTypes.
@@ -100,7 +100,7 @@ public static T convert(Object from, Class to) {
if (to.isEnum()) {
// Converting string to enum
- EnumResolver r = EnumResolver.constructUsingToString((Class>) to, ANNOTATION_INTROSPECTOR);
+ EnumResolver r = EnumResolver.constructUsingToString(DESERIALIZATION_CONFIG, to);
T value = (T) r.findEnum((String) from);
if (value == null) {
throw new RuntimeException("Invalid value '" + from + "' for enum " + to);
diff --git a/pulsar-io/elastic-search/src/main/java/org/apache/pulsar/io/elasticsearch/client/opensearch/OpenSearchHighLevelRestClient.java b/pulsar-io/elastic-search/src/main/java/org/apache/pulsar/io/elasticsearch/client/opensearch/OpenSearchHighLevelRestClient.java
index d22121a7b62f0..d21e1708c4456 100644
--- a/pulsar-io/elastic-search/src/main/java/org/apache/pulsar/io/elasticsearch/client/opensearch/OpenSearchHighLevelRestClient.java
+++ b/pulsar-io/elastic-search/src/main/java/org/apache/pulsar/io/elasticsearch/client/opensearch/OpenSearchHighLevelRestClient.java
@@ -49,12 +49,12 @@
import org.opensearch.client.indices.CreateIndexRequest;
import org.opensearch.client.indices.CreateIndexResponse;
import org.opensearch.client.indices.GetIndexRequest;
-import org.opensearch.common.Strings;
import org.opensearch.common.settings.Settings;
-import org.opensearch.common.unit.ByteSizeUnit;
-import org.opensearch.common.unit.ByteSizeValue;
import org.opensearch.common.unit.TimeValue;
import org.opensearch.common.xcontent.XContentType;
+import org.opensearch.core.common.Strings;
+import org.opensearch.core.common.unit.ByteSizeUnit;
+import org.opensearch.core.common.unit.ByteSizeValue;
import org.opensearch.index.query.QueryBuilder;
import org.opensearch.index.query.QueryBuilders;
import org.opensearch.search.builder.SearchSourceBuilder;
@@ -229,7 +229,7 @@ public boolean indexDocument(String index, String documentId, String documentSou
if (!Strings.isNullOrEmpty(documentId)) {
indexRequest.id(documentId);
}
- indexRequest.type(config.getTypeName());
+
indexRequest.source(documentSource, XContentType.JSON);
IndexResponse indexResponse = client.index(indexRequest, RequestOptions.DEFAULT);
@@ -245,7 +245,7 @@ public boolean indexDocument(String index, String documentId, String documentSou
public boolean deleteDocument(String index, String documentId) throws IOException {
DeleteRequest deleteRequest = Requests.deleteRequest(index);
deleteRequest.id(documentId);
- deleteRequest.type(config.getTypeName());
+
DeleteResponse deleteResponse = client.delete(deleteRequest, RequestOptions.DEFAULT);
if (log.isDebugEnabled()) {
log.debug("delete result {}", deleteResponse.getResult());
@@ -301,7 +301,7 @@ public void appendIndexRequest(BulkProcessor.BulkIndexRequest request) throws IO
if (!Strings.isNullOrEmpty(request.getDocumentId())) {
indexRequest.id(request.getDocumentId());
}
- indexRequest.type(config.getTypeName());
+
indexRequest.source(request.getDocumentSource(), XContentType.JSON);
if (log.isDebugEnabled()) {
log.debug("append index request id={}, type={}, source={}", request.getDocumentId(), config.getTypeName(),
@@ -314,7 +314,7 @@ public void appendIndexRequest(BulkProcessor.BulkIndexRequest request) throws IO
public void appendDeleteRequest(BulkProcessor.BulkDeleteRequest request) throws IOException {
DeleteRequest deleteRequest = new DeleteRequestWithPulsarRecord(request.getIndex(), request.getRecord());
deleteRequest.id(request.getDocumentId());
- deleteRequest.type(config.getTypeName());
+
if (log.isDebugEnabled()) {
log.debug("append delete request id={}, type={}", request.getDocumentId(), config.getTypeName());
}
diff --git a/pulsar-io/elastic-search/src/test/java/org/apache/pulsar/io/elasticsearch/ElasticSearchTestBase.java b/pulsar-io/elastic-search/src/test/java/org/apache/pulsar/io/elasticsearch/ElasticSearchTestBase.java
index 0f5a42051c7d1..8c5868f27689b 100644
--- a/pulsar-io/elastic-search/src/test/java/org/apache/pulsar/io/elasticsearch/ElasticSearchTestBase.java
+++ b/pulsar-io/elastic-search/src/test/java/org/apache/pulsar/io/elasticsearch/ElasticSearchTestBase.java
@@ -46,7 +46,7 @@ public abstract class ElasticSearchTestBase {
.orElse("docker.elastic.co/elasticsearch/elasticsearch:7.17.7");
public static final String OPENSEARCH = Optional.ofNullable(System.getenv("OPENSEARCH_IMAGE"))
- .orElse("opensearchproject/opensearch:1.2.4");
+ .orElse("opensearchproject/opensearch:2.16.0");
protected final String elasticImageName;
@@ -59,6 +59,7 @@ protected ElasticsearchContainer createElasticsearchContainer() {
if (elasticImageName.equals(OPENSEARCH)) {
DockerImageName dockerImageName = DockerImageName.parse(OPENSEARCH).asCompatibleSubstituteFor("docker.elastic.co/elasticsearch/elasticsearch");
elasticsearchContainer = new ElasticsearchContainer(dockerImageName)
+ .withEnv("OPENSEARCH_INITIAL_ADMIN_PASSWORD", "0pEn7earch!")
.withEnv("OPENSEARCH_JAVA_OPTS", "-Xms128m -Xmx256m")
.withEnv("bootstrap.memory_lock", "true")
.withEnv("plugins.security.disabled", "true");
diff --git a/pulsar-io/elastic-search/src/test/java/org/apache/pulsar/io/elasticsearch/opensearch/OpenSearchClientSslTests.java b/pulsar-io/elastic-search/src/test/java/org/apache/pulsar/io/elasticsearch/opensearch/OpenSearchClientSslTests.java
index f93a873c465d9..b7e2c45560a4e 100644
--- a/pulsar-io/elastic-search/src/test/java/org/apache/pulsar/io/elasticsearch/opensearch/OpenSearchClientSslTests.java
+++ b/pulsar-io/elastic-search/src/test/java/org/apache/pulsar/io/elasticsearch/opensearch/OpenSearchClientSslTests.java
@@ -77,7 +77,7 @@ public void testSslBasic() throws IOException {
.setElasticSearchUrl("https://" + container.getHttpHostAddress())
.setIndexName(INDEX)
.setUsername("admin")
- .setPassword("admin")
+ .setPassword("0pEn7earch!")
.setSsl(new ElasticSearchSslConfig()
.setEnabled(true)
.setTruststorePath(sslResourceDir + "/truststore.jks")
@@ -102,7 +102,7 @@ public void testSslWithHostnameVerification() throws IOException {
.setElasticSearchUrl("https://" + container.getHttpHostAddress())
.setIndexName(INDEX)
.setUsername("admin")
- .setPassword("admin")
+ .setPassword("0pEn7earch!")
.setSsl(new ElasticSearchSslConfig()
.setEnabled(true)
.setProtocols("TLSv1.2")
@@ -128,7 +128,7 @@ public void testSslWithClientAuth() throws IOException {
.setElasticSearchUrl("https://" + container.getHttpHostAddress())
.setIndexName(INDEX)
.setUsername("admin")
- .setPassword("admin")
+ .setPassword("0pEn7earch!")
.setSsl(new ElasticSearchSslConfig()
.setEnabled(true)
.setHostnameVerification(true)
diff --git a/pulsar-sql/presto-distribution/LICENSE b/pulsar-sql/presto-distribution/LICENSE
index 0e12abab752f9..378f52581a118 100644
--- a/pulsar-sql/presto-distribution/LICENSE
+++ b/pulsar-sql/presto-distribution/LICENSE
@@ -207,19 +207,19 @@ This projects includes binary packages with the following licenses:
The Apache Software License, Version 2.0
* Jackson
- - jackson-annotations-2.14.2.jar
- - jackson-core-2.14.2.jar
- - jackson-databind-2.14.2.jar
- - jackson-dataformat-smile-2.14.2.jar
- - jackson-datatype-guava-2.14.2.jar
- - jackson-datatype-jdk8-2.14.2.jar
- - jackson-datatype-joda-2.14.2.jar
- - jackson-datatype-jsr310-2.14.2.jar
- - jackson-dataformat-yaml-2.14.2.jar
- - jackson-jaxrs-base-2.14.2.jar
- - jackson-jaxrs-json-provider-2.14.2.jar
- - jackson-module-jaxb-annotations-2.14.2.jar
- - jackson-module-jsonSchema-2.14.2.jar
+ - jackson-annotations-2.16.0.jar
+ - jackson-core-2.16.0.jar
+ - jackson-databind-2.16.0.jar
+ - jackson-dataformat-smile-2.16.0.jar
+ - jackson-datatype-guava-2.16.0.jar
+ - jackson-datatype-jdk8-2.16.0.jar
+ - jackson-datatype-joda-2.16.0.jar
+ - jackson-datatype-jsr310-2.16.0.jar
+ - jackson-dataformat-yaml-2.16.0.jar
+ - jackson-jaxrs-base-2.16.0.jar
+ - jackson-jaxrs-json-provider-2.16.0.jar
+ - jackson-module-jaxb-annotations-2.16.0.jar
+ - jackson-module-jsonSchema-2.16.0.jar
* Guava
- guava-32.1.1-jre.jar
- listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar
@@ -455,7 +455,7 @@ The Apache Software License, Version 2.0
* Snappy
- snappy-java-1.1.10.5.jar
* Jackson
- - jackson-module-parameter-names-2.14.2.jar
+ - jackson-module-parameter-names-2.16.0.jar
* Java Assist
- javassist-3.25.0-GA.jar
* Java Native Access
diff --git a/tests/integration/pom.xml b/tests/integration/pom.xml
index 31caa44ca42be..e9a5369466431 100644
--- a/tests/integration/pom.xml
+++ b/tests/integration/pom.xml
@@ -220,6 +220,12 @@
test
+
+ org.projectlombok
+ lombok
+ test
+
+
org.testcontainers
diff --git a/tests/integration/src/test/java/org/apache/pulsar/tests/integration/io/sinks/OpenSearchSinkTester.java b/tests/integration/src/test/java/org/apache/pulsar/tests/integration/io/sinks/OpenSearchSinkTester.java
index 75f0fdac6f90c..8daed8d5c04d5 100644
--- a/tests/integration/src/test/java/org/apache/pulsar/tests/integration/io/sinks/OpenSearchSinkTester.java
+++ b/tests/integration/src/test/java/org/apache/pulsar/tests/integration/io/sinks/OpenSearchSinkTester.java
@@ -35,7 +35,7 @@
public class OpenSearchSinkTester extends ElasticSearchSinkTester {
public static final String OPENSEARCH = Optional.ofNullable(System.getenv("OPENSEARCH_IMAGE"))
- .orElse("opensearchproject/opensearch:1.2.4");
+ .orElse("opensearchproject/opensearch:2.16.0");
private RestHighLevelClient elasticClient;
@@ -49,6 +49,7 @@ protected ElasticsearchContainer createElasticContainer() {
DockerImageName dockerImageName = DockerImageName.parse(OPENSEARCH)
.asCompatibleSubstituteFor("docker.elastic.co/elasticsearch/elasticsearch");
return new ElasticsearchContainer(dockerImageName)
+ .withEnv("OPENSEARCH_INITIAL_ADMIN_PASSWORD", "0pEn7earch!")
.withEnv("OPENSEARCH_JAVA_OPTS", "-Xms128m -Xmx256m")
.withEnv("bootstrap.memory_lock", "true")
.withEnv("plugins.security.disabled", "true");