From 9a9652534d9443cfd10ec1218997acd78ed8f88a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 10 Sep 2019 13:56:36 +0000 Subject: [PATCH] [WSO2-Release] [Release 3.1.1] update documentation for release 3.1.1 --- README.md | 4 +- docs/api/3.1.1.md | 248 +++++++++++++++++++++++++++++++++++++++++++++ docs/api/latest.md | 28 ++++- docs/index.md | 4 +- mkdocs.yml | 1 + 5 files changed, 279 insertions(+), 6 deletions(-) create mode 100644 docs/api/3.1.1.md diff --git a/README.md b/README.md index fa15669..95321f3 100644 --- a/README.md +++ b/README.md @@ -21,11 +21,11 @@ For information on Siddhi and i ## Latest API Docs -Latest API Docs is 3.1.0. +Latest API Docs is 3.1.1. ## Features -* elasticsearch *(Store)*

Elasticsearch store implementation uses Elasticsearch indexing document for underlying data storage. The events are converted to Elasticsearch index documents when the events are inserted into the elasticsearch store. Elasticsearch indexing documents are converted to events when the documents are read from Elasticsearch indexes. The internal store is connected to the Elastisearch server via the Elasticsearch Java High Level REST Client library.

+* elasticsearch *(Store)*

Elasticsearch store implementation uses Elasticsearch indexing document for underlying data storage. The events are converted to Elasticsearch index documents when the events are inserted into the elasticsearch store. Elasticsearch indexing documents are converted to events when the documents are read from Elasticsearch indexes. The internal store is connected to the Elastisearch server via the Elasticsearch Java High Level REST Client library.

## Prerequisites - Elasticsearch can be downloaded directly from href="https://www.elastic.co/downloads/elasticsearch" in zip, tar.gz, deb, or rpm packages. diff --git a/docs/api/3.1.1.md b/docs/api/3.1.1.md new file mode 100644 index 0000000..3eeabd2 --- /dev/null +++ b/docs/api/3.1.1.md @@ -0,0 +1,248 @@ +# API Docs - v3.1.1 + +!!! Info "Tested Siddhi Core version: *5.1.2*" + It could also support other Siddhi Core minor versions. + +## Store + +### elasticsearch *(Store)* +

+

Elasticsearch store implementation uses Elasticsearch indexing document for underlying data storage. The events are converted to Elasticsearch index documents when the events are inserted into the elasticsearch store. Elasticsearch indexing documents are converted to events when the documents are read from Elasticsearch indexes. The internal store is connected to the Elastisearch server via the Elasticsearch Java High Level REST Client library.

+

+Syntax + +``` +@Store(type="elasticsearch", hostname="", port="", scheme="", elasticsearch.member.list="", username="", password="", index.name="", payload.index.of.index.name="", index.alias="", index.number.of.shards="", index.number.of.replicas="", bulk.actions="", bulk.size="", concurrent.requests="", flush.interval="", backoff.policy.retry.no="", backoff.policy.wait.time="", ssl.enabled="", trust.store.type="", trust.store.path="", trust.store.pass="", backoff.policy="", backoff.policy.retry.no="", backoff.policy.wait.time="") +@PrimaryKey("PRIMARY_KEY") +@Index("INDEX") +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
hostname

The hostname of the Elasticsearch server.

localhostSTRINGYesNo
port

The port of the Elasticsearch server.

9200INTYesNo
scheme

The scheme type of the Elasticsearch server connection.

httpSTRINGYesNo
elasticsearch.member.list

The list of elasticsearch host names. in comma separated mannerhttps://hostname1:9200,https://hostname2:9200

nullSTRINGYesNo
username

The username for the Elasticsearch server connection.

elasticSTRINGYesNo
password

The password for the Elasticsearch server connection.

changemeSTRINGYesNo
index.name

The name of the Elasticsearch index.

The table name defined in the Siddhi App query.STRINGYesNo
payload.index.of.index.name

The payload which is used to create the index. This can be used if the user needs to create index names dynamically

-1INTYesNo
index.alias

The alias of the Elasticsearch index.

nullSTRINGYesNo
index.number.of.shards

The number of shards allocated for the index in the Elasticsearch server.

3INTYesNo
index.number.of.replicas

The number of replicas for the index in the Elasticsearch server.

2INTYesNo
bulk.actions

The number of actions to be added to flush a new bulk request. Use -1 to disable it

1INTYesNo
bulk.size

The size of size of actions currently added to the bulk request to flush a new bulk request in MB. Use -1 to disable it

1LONGYesNo
concurrent.requests

The number of concurrent requests allowed to be executed. Use 0 to only allow the execution of a single request

0INTYesNo
flush.interval

The flush interval flushing any BulkRequest pending if the interval passes.

10LONGYesNo
backoff.policy.retry.no

The number of retries until backoff (The backoff policy defines how the bulk processor should handle retries of bulk requests internally in case they have failed due to resource constraints (i.e. a thread pool was full)).

3INTYesNo
backoff.policy.wait.time

The constant back off policy that initially waits until the next retry in seconds.

1LONGYesNo
ssl.enabled

SSL is enabled or not.

nullBOOLYesNo
trust.store.type

Trust store type.

jksSTRINGYesNo
trust.store.path

Trust store path.

nullSTRINGYesNo
trust.store.pass

Trust store password.

wso2carbonSTRINGYesNo
backoff.policy

Provides a backoff policy(eg: constantBackoff, exponentialBackoff, disable) for bulk requests, whenever a bulk request is rejected due to resource constraints. Bulk processor will wait before the operation is retried internally.

constantBackoffSTRINGYesNo
backoff.policy.retry.no

The maximum number of retries. Must be a non-negative number.

3INTYesNo
backoff.policy.wait.time

The delay defines how long to wait between retry attempts. Must not be null.

1INTYesNo
+ +Examples +EXAMPLE 1 +``` +@Store(type="elasticsearch", host="localhost", username="elastic", password="changeme", index.name="MyStockTable", field.length="symbol:100", bulk.actions="5000", bulk.size="1", concurrent.requests="2", flush.interval="1", backoff.policy.retry.no="3", backoff.policy.wait.time="1") +@PrimaryKey("symbol")define table StockTable (symbol string, price float, volume long); +``` +

+

This example creates an index named 'MyStockTable' in the Elasticsearch server if it does not already exist (with three attributes named 'symbol', 'price', and 'volume' of the types 'string', 'float' and 'long' respectively). The connection is made as specified by the parameters configured for the '@Store' annotation. The 'symbol' attribute is considered a unique field and an Elasticsearch index document ID is generated for it.

+

+EXAMPLE 2 +``` +@Store(type="elasticsearch", host="localhost", username="elastic", password="changeme", index.name="MyStockTable", field.length="symbol:100", bulk.actions="5000", bulk.size="1", concurrent.requests="2", flush.interval="1", backoff.policy.retry.no="3", backoff.policy.wait.time="1", ssl.enabled="true", trust.store.type="jks", trust.store.path="/User/wso2/wso2sp/resources/security/client-truststore.jks", trust.store.pass="wso2carbon") +@PrimaryKey("symbol")define table StockTable (symbol string, price float, volume long); +``` +

+

This example uses SSL to connect to Elasticsearch.

+

+EXAMPLE 3 +``` +@Store(type="elasticsearch", elasticsearch.member.list="https://hostname1:9200,https://hostname2:9200", username="elastic", password="changeme", index.name="MyStockTable", field.length="symbol:100", bulk.actions="5000", bulk.size="1", concurrent.requests="2", flush.interval="1", backoff.policy.retry.no="3", backoff.policy.wait.time="1") +@PrimaryKey("symbol")define table StockTable (symbol string, price float, volume long); +``` +

+

This example defined several elasticsearch members to publish data using elasticsearch.member.list parameter.

+

diff --git a/docs/api/latest.md b/docs/api/latest.md index 10f76d5..3eeabd2 100644 --- a/docs/api/latest.md +++ b/docs/api/latest.md @@ -1,4 +1,4 @@ -# API Docs - v3.1.0 +# API Docs - v3.1.1 !!! Info "Tested Siddhi Core version: *5.1.2*" It could also support other Siddhi Core minor versions. @@ -12,7 +12,7 @@ Syntax ``` -@Store(type="elasticsearch", hostname="", port="", scheme="", elasticsearch.member.list="", username="", password="", index.name="", payload.index.of.index.name="", index.alias="", index.number.of.shards="", index.number.of.replicas="", bulk.actions="", bulk.size="", concurrent.requests="", flush.interval="", backoff.policy.retry.no="", backoff.policy.wait.time="", ssl.enabled="", trust.store.type="", trust.store.path="", trust.store.pass="") +@Store(type="elasticsearch", hostname="", port="", scheme="", elasticsearch.member.list="", username="", password="", index.name="", payload.index.of.index.name="", index.alias="", index.number.of.shards="", index.number.of.replicas="", bulk.actions="", bulk.size="", concurrent.requests="", flush.interval="", backoff.policy.retry.no="", backoff.policy.wait.time="", ssl.enabled="", trust.store.type="", trust.store.path="", trust.store.pass="", backoff.policy="", backoff.policy.retry.no="", backoff.policy.wait.time="") @PrimaryKey("PRIMARY_KEY") @Index("INDEX") ``` @@ -195,6 +195,30 @@ Yes No + + backoff.policy +

Provides a backoff policy(eg: constantBackoff, exponentialBackoff, disable) for bulk requests, whenever a bulk request is rejected due to resource constraints. Bulk processor will wait before the operation is retried internally.

+ constantBackoff + STRING + Yes + No + + + backoff.policy.retry.no +

The maximum number of retries. Must be a non-negative number.

+ 3 + INT + Yes + No + + + backoff.policy.wait.time +

The delay defines how long to wait between retry attempts. Must not be null.

+ 1 + INT + Yes + No + Examples diff --git a/docs/index.md b/docs/index.md index fa15669..95321f3 100644 --- a/docs/index.md +++ b/docs/index.md @@ -21,11 +21,11 @@ For information on Siddhi and i ## Latest API Docs -Latest API Docs is 3.1.0. +Latest API Docs is 3.1.1. ## Features -* elasticsearch *(Store)*

Elasticsearch store implementation uses Elasticsearch indexing document for underlying data storage. The events are converted to Elasticsearch index documents when the events are inserted into the elasticsearch store. Elasticsearch indexing documents are converted to events when the documents are read from Elasticsearch indexes. The internal store is connected to the Elastisearch server via the Elasticsearch Java High Level REST Client library.

+* elasticsearch *(Store)*

Elasticsearch store implementation uses Elasticsearch indexing document for underlying data storage. The events are converted to Elasticsearch index documents when the events are inserted into the elasticsearch store. Elasticsearch indexing documents are converted to events when the documents are read from Elasticsearch indexes. The internal store is connected to the Elastisearch server via the Elasticsearch Java High Level REST Client library.

## Prerequisites - Elasticsearch can be downloaded directly from href="https://www.elastic.co/downloads/elasticsearch" in zip, tar.gz, deb, or rpm packages. diff --git a/mkdocs.yml b/mkdocs.yml index eccfdf1..5367b82 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -34,6 +34,7 @@ pages: - Information: index.md - API Docs: - latest: api/latest.md + - 3.1.1: api/3.1.1.md - 3.1.0: api/3.1.0.md - 3.0.0: api/3.0.0.md - 2.1.1: api/2.1.1.md