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.git


The following commit(s) were added to refs/heads/master by this push:
     new 5baa2e0  [ElasticSearch Sink] Correct @FieldDoc defaultValue for some 
fields: primaryFields,maxRetries,indexNumberOfReplicas,createIndexIfNeeded 
(#12697)
5baa2e0 is described below

commit 5baa2e0e16c0487cf2f160a739f5cb18dc420fe6
Author: Nicolò Boschi <[email protected]>
AuthorDate: Thu Dec 2 16:27:33 2021 +0100

    [ElasticSearch Sink] Correct @FieldDoc defaultValue for some fields: 
primaryFields,maxRetries,indexNumberOfReplicas,createIndexIfNeeded (#12697)
---
 .../org/apache/pulsar/io/elasticsearch/ElasticSearchConfig.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/pulsar-io/elastic-search/src/main/java/org/apache/pulsar/io/elasticsearch/ElasticSearchConfig.java
 
b/pulsar-io/elastic-search/src/main/java/org/apache/pulsar/io/elasticsearch/ElasticSearchConfig.java
index 7dbfd03..dc6d0d4 100644
--- 
a/pulsar-io/elastic-search/src/main/java/org/apache/pulsar/io/elasticsearch/ElasticSearchConfig.java
+++ 
b/pulsar-io/elastic-search/src/main/java/org/apache/pulsar/io/elasticsearch/ElasticSearchConfig.java
@@ -79,14 +79,14 @@ public class ElasticSearchConfig implements Serializable {
 
     @FieldDoc(
             required = false,
-            defaultValue = "true",
+            defaultValue = "false",
             help = "Create the index if it does not exist"
     )
     private boolean createIndexIfNeeded = false;
 
     @FieldDoc(
         required = false,
-        defaultValue = "1",
+        defaultValue = "0",
         help = "The number of replicas of the index"
     )
     private int indexNumberOfReplicas = 0;
@@ -109,7 +109,7 @@ public class ElasticSearchConfig implements Serializable {
 
     @FieldDoc(
             required = false,
-            defaultValue = "-1",
+            defaultValue = "1",
             help = "The maximum number of retries for elasticsearch requests. 
Use -1 to disable it."
     )
     private int maxRetries = 1;
@@ -216,7 +216,7 @@ public class ElasticSearchConfig implements Serializable {
 
     @FieldDoc(
             required = false,
-            defaultValue = "id",
+            defaultValue = "",
             help = "The comma separated ordered list of field names used to 
build the Elasticsearch document _id from the record value. If this list is a 
singleton, the field is converted as a string. If this list has 2 or more 
fields, the generated _id is a string representation of a JSON array of the 
field values."
     )
     private String primaryFields = "";

Reply via email to