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/26 14:59:22 UTC

[shardingsphere-elasticjob] branch master updated: Update documents for SnapshotService configuration via Spring Boot Starter (#1273)

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 b536296  Update documents for SnapshotService configuration via Spring Boot Starter (#1273)
b536296 is described below

commit b53629632b36228cf5ad5cb9924bbe8142e47536
Author: 吴伟杰 <ro...@me.com>
AuthorDate: Sun Jul 26 22:58:19 2020 +0800

    Update documents for SnapshotService configuration via Spring Boot Starter (#1273)
---
 .../configuration/spring-boot-starter.cn.md        | 26 ++++++++++++++++++
 .../configuration/spring-boot-starter.en.md        | 26 ++++++++++++++++++
 .../additional-spring-configuration-metadata.json  | 32 +++++++++++-----------
 3 files changed, 68 insertions(+), 16 deletions(-)

diff --git a/docs/content/user-manual/elasticjob-lite/configuration/spring-boot-starter.cn.md b/docs/content/user-manual/elasticjob-lite/configuration/spring-boot-starter.cn.md
index 0906801..fb87217 100644
--- a/docs/content/user-manual/elasticjob-lite/configuration/spring-boot-starter.cn.md
+++ b/docs/content/user-manual/elasticjob-lite/configuration/spring-boot-starter.cn.md
@@ -120,3 +120,29 @@ elasticjob:
 ```
 elasticjob.tracing.type=RDB
 ```
+
+## 作业信息导出配置
+
+配置前缀:`elasticjob.dump`
+
+| 属性名           | 缺省值        | 是否必填 |
+| -----------------|:------------- |:-------- |
+| enabled          | true          | 否       |
+| port             |               | 是       |
+
+Spring Boot 提供了作业信息导出端口快速配置,只需在配置中指定导出所用的端口号即可启用导出功能。
+如果没有指定端口号,导出功能不会生效。
+
+配置参考:
+
+**YAML**
+```yaml
+elasticjob:
+  dump:
+    port: 9888
+```
+
+**Properties**
+```
+elasticjob.dump.port=9888
+```
diff --git a/docs/content/user-manual/elasticjob-lite/configuration/spring-boot-starter.en.md b/docs/content/user-manual/elasticjob-lite/configuration/spring-boot-starter.en.md
index e3cd83e..b092d2a 100644
--- a/docs/content/user-manual/elasticjob-lite/configuration/spring-boot-starter.en.md
+++ b/docs/content/user-manual/elasticjob-lite/configuration/spring-boot-starter.en.md
@@ -120,3 +120,29 @@ elasticjob:
 ```
 elasticjob.tracing.type=RDB
 ```
+
+### Dump Job Info Configuration
+
+Prefix: `elasticjob.dump`
+
+| Property name    | Default value | Required |
+| -----------------|:------------- |:-------- |
+| enabled          | true          | No       |
+| port             |               | Yes      |
+
+Designate a port as dump port in configurations. The Spring Boot Starter will enable dumping automatically.
+If the port for job dump was missing, dump won't be enabled.
+
+Reference: 
+
+**YAML**
+```yaml
+elasticjob:
+  dump:
+    port: 9888
+```
+
+**Properties**
+```
+elasticjob.dump.port=9888
+```
diff --git a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-boot-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-boot-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
index 9469e91..db70e7d 100644
--- a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-boot-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
+++ b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-boot-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -24,8 +24,11 @@
     },
     {
       "name": "elasticjob.tracing",
-      "type": "org.apache.shardingsphere.elasticjob.lite.spring.boot.reg.ZookeeperProperties",
       "description": "Event Trace configurations."
+    },
+    {
+      "name": "elasticjob.dump",
+      "description": "Snapshot service configurations."
     }
   ],
   "properties": [
@@ -88,6 +91,18 @@
     {
       "name": "elasticjob.jobs",
       "type": "java.util.Map<java.lang.String,org.apache.shardingsphere.elasticjob.lite.spring.boot.job.ElasticJobConfigurationProperties>"
+    },
+    {
+      "name": "elasticjob.dump.port",
+      "type": "java.lang.Integer",
+      "description": "A port for configuring SnapshotService.",
+      "sourceType": "org.apache.shardingsphere.elasticjob.lite.spring.boot.reg.snapshot.SnapshotServiceProperties"
+    },
+    {
+      "name": "elasticjob.dump.enabled",
+      "type": "java.lang.Boolean",
+      "defaultValue": true,
+      "description": "Enable SnapshotService."
     }
   ],
   "hints": [
@@ -103,21 +118,6 @@
     {
       "name": "elasticjob.jobs.keys",
       "values": [
-        {
-          "value": "simpleJob"
-        }
-      ]
-    },
-    {
-      "name": "elasticjob.jobs.values",
-      "values": [],
-      "providers": [
-        {
-          "name": "class-reference",
-          "parameters": {
-            "target": "org.apache.shardingsphere.elasticjob.lite.spring.boot.job.ElasticJobConfigurationProperties"
-          }
-        }
       ]
     }
   ]