You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2020/07/19 14:16:06 UTC

[shardingsphere-elasticjob] branch master updated: translate user manual, spring-namespace for configuration. (#1172)

This is an automated email from the ASF dual-hosted git repository.

zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere-elasticjob.git


The following commit(s) were added to refs/heads/master by this push:
     new b331855  translate user manual, spring-namespace for configuration. (#1172)
b331855 is described below

commit b3318559a1a54c110859a5619438486f38198b9a
Author: Zonglei Dong <do...@apache.org>
AuthorDate: Sun Jul 19 22:15:59 2020 +0800

    translate user manual, spring-namespace for configuration. (#1172)
---
 .../configuration/spring-namespace.en.md           | 107 ++++++++++++++++++++-
 1 file changed, 106 insertions(+), 1 deletion(-)

diff --git a/docs/content/user-manual/elasticjob-lite/configuration/spring-namespace.en.md b/docs/content/user-manual/elasticjob-lite/configuration/spring-namespace.en.md
index 611573b..911004a 100644
--- a/docs/content/user-manual/elasticjob-lite/configuration/spring-namespace.en.md
+++ b/docs/content/user-manual/elasticjob-lite/configuration/spring-namespace.en.md
@@ -4,4 +4,109 @@ weight = 2
 chapter = true
 +++
 
-TODO
+To use the Spring namespace, user need to add the dependency of the `elasticjob-lite-spring` module in the `pom.xml` file.
+
+```xml
+<dependency>
+    <groupId>org.apache.shardingsphere.elasticjob</groupId>
+    <artifactId>elasticjob-lite-spring</artifactId>
+    <version>${latest.release.version}</version>
+</dependency>
+```
+
+Spring namespace: [http://shardingsphere.apache.org/schema/elasticjob/elasticjob.xsd](http://shardingsphere.apache.org/schema/elasticjob/elasticjob.xsd)
+
+## Registry Center Configuration
+
+\<elasticjob:zookeeper />
+
+Configuration: 
+
+| Name                            | Required |
+| ------------------------------- |:-------- |
+| id                              | Yes      |
+| server-lists                    | Yes      |
+| namespace                       | Yes      |
+| base-sleep-time-milliseconds    | No       |
+| max-sleep-time-milliseconds     | No       |
+| max-retries                     | No       |
+| session-timeout-milliseconds    | No       |
+| connection-timeout-milliseconds | No       |
+| digest                          | No       |
+
+## Job Configuration
+
+\<elasticjob:job />
+
+Configuration:
+
+| Name                              | Required |
+| --------------------------------- |:-------- |
+| id                                | Yes      |
+| class                             | No       |
+| job-ref                           | No       |
+| registry-center-ref               | Yes      |
+| tracing-ref                       | No       |
+| cron                              | Yes      |
+| sharding-total-count              | Yes      |
+| sharding-item-parameters          | No       |
+| job-parameter                     | No       |
+| monitor-execution                 | No       |
+| failover                          | No       |
+| misfire                           | No       |
+| max-time-diff-seconds             | No       |
+| reconcile-interval-minutes        | No       |
+| job-sharding-strategy-type        | No       |
+| job-executor-service-handler-type | No       |
+| job-error-handler-type            | No       |
+| description                       | No       |
+| props                             | No       |
+| disabled                          | No       |
+| overwrite                         | No       |
+
+## Job Listener Configuration
+
+\<elasticjob:listener />
+
+`elasticjob:listener` must be configured as a child element of `elasticjob:job`, and configure only once in the child element.
+
+Configuration: 
+
+| Name   | Data Type   | Required | Default Value | Description                                                              |
+| ------ |:----------- |:-------- |:------------- |:------------------------------------------------------------------------ |
+| class  | String      | Yes      |               | Common listener class, need to implement `ElasticJobListener` interface  |
+
+\<elasticjob:distributed-listener />
+
+`elasticjob:distributed-listener` must be configured as a child element of `elasticjob:job`, and configure only once in the child element.
+
+Configuration: 
+
+| Name                           | Data Type   | Required | Default Value  | Description                                                                                   |
+| ------------------------------ |:----------- |:-------- |:-------------- |:--------------------------------------------------------------------------------------------- |
+| class                          | String      | Yes      |                | Distributed listener class, need to extend `AbstractDistributeOnceElasticJobListener` class   |
+| started-timeout-milliseconds   | long        | No       | Long.MAX_VALUE | The timeout in milliseconds before the last job is executed                                   |
+| completed-timeout-milliseconds | long        | No       | Long.MAX_VALUE | The timeout in milliseconds after the last job is executed                                    |
+
+## Event Tracing Configuration
+
+\<elasticjob:rdb-event-trace />
+
+Configuration:
+
+| Name            | Data Type  | Required | Default Value | Description                                     |
+| --------------- |:---------- |:-------- |:------------- |:-------------------------------------------     |
+| id              | String     | Yes      |               | The bean's identify of the event tracing        |
+| data-source-ref | DataSource | No       |               | The bean's name of the event tracing DataSource |
+
+## Job Dump Configuration
+
+\<elasticjob:snapshot />
+
+Configuration: 
+
+| Name                | Data Type   | Required | Default Value | Description                                                                     |
+| ------------------- |:----------- |:-------- |:------------- |:------------------------------------------------------------------------------- |
+| id                  | String      | Yes      |               | The identify of the monitoring service in the Spring container                  |
+| registry-center-ref | String      | Yes      |               | Registry center bean's reference, need to the statement of the `reg:zookeeper`  |
+| dump-port           | String      | Yes      |               | Job dump port<br />usage: echo "dump@jobName" \| nc 127.0.0.1 9888             |