[
https://issues.apache.org/jira/browse/FLINK-4491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15675084#comment-15675084
]
ASF GitHub Bot commented on FLINK-4491:
---------------------------------------
Github user fpompermaier commented on a diff in the pull request:
https://github.com/apache/flink/pull/2790#discussion_r88567247
--- Diff:
flink-streaming-connectors/flink-connector-elasticsearch2/src/test/java/org/apache/flink/streaming/connectors/elasticsearch2/ElasticsearchSinkITCase.java
---
@@ -210,6 +216,122 @@ public void cancel() {
running = false;
}
}
+
+ @Test
+ public void testTemplateCreation() throws Exception {
+ // Settings.Builder
settings=Settings.settingsBuilder().put("","");
+
+ Map<String, String> config = new HashMap<>();
+ // This instructs the sink to emit after every element,
otherwise they
+ // would be buffered
+ config.put(ElasticsearchSink.CONFIG_KEY_BULK_FLUSH_MAX_ACTIONS,
"1");
+ config.put("cluster.name", "my-transport-client-cluster");
--- End diff --
Try to see if "cluster.name" can be replaced by
ClusterName.CLUSTER_NAME_SETTING
> Handle index.number_of_shards in the ES connector
> -------------------------------------------------
>
> Key: FLINK-4491
> URL: https://issues.apache.org/jira/browse/FLINK-4491
> Project: Flink
> Issue Type: Improvement
> Components: Streaming Connectors
> Affects Versions: 1.1.0
> Reporter: Flavio Pompermaier
> Priority: Minor
> Labels: elasticsearch, streaming
>
> At the moment is not possible to configure the number of shards if an index
> does not already exists on the Elasticsearch cluster. It could be a great
> improvement to handle the index.number_of_shards (passed in the configuration
> object). E.g.:
> {code:java}
> Map<String, String> config = Maps.newHashMap();
> config.put("bulk.flush.max.actions", "1");
> config.put("cluster.name", "my-cluster-name");
> config.put("index.number_of_shards", "1");
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)