You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by pe...@apache.org on 2021/12/21 02:18:36 UTC
[pulsar] 04/16: [ElasticSearch Sink] Correct @FieldDoc defaultValue for some fields: primaryFields, maxRetries, indexNumberOfReplicas, createIndexIfNeeded (#12697)
This is an automated email from the ASF dual-hosted git repository.
penghui pushed a commit to branch branch-2.9
in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit 112d9ee8ab0563816bb5775b2ca7ccd3cc3b8bf5
Author: Nicolò Boschi <bo...@gmail.com>
AuthorDate: Thu Dec 2 16:27:33 2021 +0100
[ElasticSearch Sink] Correct @FieldDoc defaultValue for some fields: primaryFields,maxRetries,indexNumberOfReplicas,createIndexIfNeeded (#12697)
(cherry picked from commit 5baa2e0e16c0487cf2f160a739f5cb18dc420fe6)
---
.../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 = "";