This is an automated email from the ASF dual-hosted git repository. hjf 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 45921c8 Add *ElasticSearch sink connector guide* (#5258) 45921c8 is described below commit 45921c8bdd997c56cc48b94454080e0b23bc56a9 Author: Anonymitaet <50226895+anonymit...@users.noreply.github.com> AuthorDate: Sun Sep 29 14:27:55 2019 +0800 Add *ElasticSearch sink connector guide* (#5258) --- site2/docs/io-connectors.md | 2 +- site2/docs/io-elasticsearch-sink.md | 49 +++++++++++++++++++++++++++++++++++++ site2/docs/io-elasticsearch.md | 21 ---------------- 3 files changed, 50 insertions(+), 22 deletions(-) diff --git a/site2/docs/io-connectors.md b/site2/docs/io-connectors.md index b5d42aa..2312202 100644 --- a/site2/docs/io-connectors.md +++ b/site2/docs/io-connectors.md @@ -44,7 +44,7 @@ Pulsar has various sink connectors, which are sorted alphabetically as below. - [Cassandra sink connector](io-cassandra-sink.md) -- [ElasticSearch sink connector](io-elasticsearch.md) +- [ElasticSearch sink connector](io-elasticsearch-sink.md) - [Flume sink connector](io-flume-sink.md) diff --git a/site2/docs/io-elasticsearch-sink.md b/site2/docs/io-elasticsearch-sink.md new file mode 100644 index 0000000..d3312e5 --- /dev/null +++ b/site2/docs/io-elasticsearch-sink.md @@ -0,0 +1,49 @@ +--- +id: io-elasticsearch-sink +title: ElasticSearch sink connector +sidebar_label: ElasticSearch sink connector +--- + +The ElasticSearch sink connector pulls messages from Pulsar topics and persists the messages to indexes. + +## Configuration + +The configuration of the ElasticSearch sink connector has the following properties. + +### Property + +| Name | Type|Required | Default | Description +|------|----------|----------|---------|-------------| +| `elasticSearchUrl` | String| true |" " (empty string)| The URL of elastic search cluster to which the connector connects. | +| `indexName` | String| true |" " (empty string)| The index name to which the connector writes messages. | +| `indexNumberOfShards` | int| false |1| The number of shards of the index. | +| `indexNumberOfReplicas` | int| false |1 | The number of replicas of the index. | +| `username` | String| false |" " (empty string)| The username used by the connector to connect to the elastic search cluster. <br><br>If `username` is set, then `password` should also be provided. | +| `password` | String| false | " " (empty string)|The password used by the connector to connect to the elastic search cluster. <br><br>If `username` is set, then `password` should also be provided. | + +### Example + +Before using the ElasticSearch sink connector, you need to create a configuration file through one of the following methods. + +* JSON + + ```json + { + "elasticSearchUrl": "http://localhost:90902", + "indexName": "myIndex", + "username": "scooby", + "password": "doobie" + } + ``` + +* YAML + + ```yaml + configs: + elasticSearchUrl: "http://localhost:90902" + indexName: "myIndex" + username: "scooby" + password: "doobie" + ``` + + diff --git a/site2/docs/io-elasticsearch.md b/site2/docs/io-elasticsearch.md deleted file mode 100644 index 18aacdf..0000000 --- a/site2/docs/io-elasticsearch.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -id: io-elasticsearch -title: ElasticSearch Connector -sidebar_label: ElasticSearch Connector ---- - -## Sink - -The ElasticSearch Sink Connector is used to pull messages from Pulsar topics and persist the messages -to a index. - -## Sink Configuration Options - -| Name | Default | Required | Description | -|------|---------|----------|-------------| -| `elasticSearchUrl` | `null` | `true` | The url of elastic search cluster that the connector connects to. | -| `indexName` | `null` | `true` | The index name that the connector writes messages to. | -| `indexNumberOfShards` | `1` | `false` | The number of shards of the index. | -| `indexNumberOfReplicas` | `1` | `false` | The number of replicas of the index. | -| `username` | `null` | `false` | The username used by the connector to connect to the elastic search cluster. If username is set, a password should also be provided. | -| `password` | `null` | `false` | The password used by the connector to connect to the elastic search cluster. If password is set, a username should also be provided. | \ No newline at end of file