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 bef1db3  Translate user manual, java-api and spring-namespace for 
event-trace. (#1144)
bef1db3 is described below

commit bef1db36669f7ac8cd8e94fd6e9572f1e2c461e1
Author: Zonglei Dong <[email protected]>
AuthorDate: Sat Jul 18 21:25:42 2020 +0800

    Translate user manual, java-api and spring-namespace for event-trace. 
(#1144)
    
    * translate user manual, java-api for event-trace.
    
    * translate user manual, spring-namespace for event-trace.
    
    * fixes error translation.
---
 .../usage/event-trace/java-api.en.md               | 15 ++++++++-
 .../usage/event-trace/spring-namespace.en.md       | 38 +++++++++++++++++++++-
 .../usage/job-api/spring-namespace.en.md           |  4 +--
 3 files changed, 53 insertions(+), 4 deletions(-)

diff --git 
a/docs/content/user-manual/elasticjob-lite/usage/event-trace/java-api.en.md 
b/docs/content/user-manual/elasticjob-lite/usage/event-trace/java-api.en.md
index fe7d740..cf730a4 100644
--- a/docs/content/user-manual/elasticjob-lite/usage/event-trace/java-api.en.md
+++ b/docs/content/user-manual/elasticjob-lite/usage/event-trace/java-api.en.md
@@ -4,4 +4,17 @@ weight = 1
 chapter = true
 +++
 
-TODO
+ElasticJob-Lite currently provides `TracingConfiguration` based on database in 
the configuration.
+Developers can also extend it through SPI.
+
+```java
+    // init DataSource
+    DataSource dataSource = ...;
+    // define tracing configuration based on relation database
+    TracingConfiguration tracingConfig = new TracingConfiguration<>("RDB", 
dataSource);
+    // init registry center
+    CoordinatorRegistryCenter regCenter = ...;
+    // init job configuration
+    JobConfiguration jobConfig = ...;
+    new ScheduleJobBootstrap(regCenter, jobConfig, tracingConfig).schedule();
+```
diff --git 
a/docs/content/user-manual/elasticjob-lite/usage/event-trace/spring-namespace.en.md
 
b/docs/content/user-manual/elasticjob-lite/usage/event-trace/spring-namespace.en.md
index e432ee4..32d833d 100644
--- 
a/docs/content/user-manual/elasticjob-lite/usage/event-trace/spring-namespace.en.md
+++ 
b/docs/content/user-manual/elasticjob-lite/usage/event-trace/spring-namespace.en.md
@@ -4,4 +4,40 @@ weight = 3
 chapter = true
 +++
 
-TODO
+## Event tracing configuration
+
+```xml
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans";
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+    xmlns:elasticjob="http://shardingsphere.apache.org/schema/elasticjob";
+    xsi:schemaLocation="http://www.springframework.org/schema/beans 
+                        
http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://shardingsphere.apache.org/schema/elasticjob
+                        
http://shardingsphere.apache.org/schema/elasticjob/elasticjob.xsd
+                        ">
+    <!-- Configure registry center for job -->
+    <elasticjob:zookeeper id="regCenter" server-lists="yourhost:2181" 
namespace="my-job" base-sleep-time-milliseconds="1000" 
max-sleep-time-milliseconds="3000" max-retries="3" />
+    
+    <!-- Configure job java bean -->
+    <bean id="myJob" class="xxx.MyJob" />
+    
+    <!-- Configure DataSource -->
+    <bean id="tracingDataSource" 
class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
+        <property name="driverClassName" value="${driver.class.name}" />
+        <property name="url" value="${url}" />
+        <property name="username" value="${username}" />
+        <property name="password" value="${password}" />
+    </bean>
+    <!-- Configure event tracing -->
+    <elasticjob:rdb-event-trace id="elasticJobTrace" 
data-source-ref="elasticJobTracingDataSource" />
+    
+    <!-- Configure job -->
+    <elasticjob:job id="${myJob.id}" job-ref="myJob" 
registry-center-ref="regCenter" tracing-ref="elasticJobTrace" 
sharding-total-count="3" cron="0/1 * * * * ?" />
+</beans>
+```
+
+## Job start
+
+If the Spring container start, the `XML` that configures the Spring namespace 
will be loaded, and the job will be automatically started.
+
diff --git 
a/docs/content/user-manual/elasticjob-lite/usage/job-api/spring-namespace.en.md 
b/docs/content/user-manual/elasticjob-lite/usage/job-api/spring-namespace.en.md
index 6c9d969..bd1022c 100644
--- 
a/docs/content/user-manual/elasticjob-lite/usage/job-api/spring-namespace.en.md
+++ 
b/docs/content/user-manual/elasticjob-lite/usage/job-api/spring-namespace.en.md
@@ -7,7 +7,7 @@ chapter = true
 ElasticJob-Lite provides a custom Spring namespace, which can be used with the 
Spring.
 Through the way of DI (Dependency Injection), developers can easily use data 
sources and other objects that managed by the Spring container in their jobs, 
and use placeholders to get values ​​from property files.
 
-## Config job for Spring namespace
+## Job configuration
 
 ```xml
 <?xml version="1.0" encoding="UTF-8"?>
@@ -41,4 +41,4 @@ Through the way of DI (Dependency Injection), developers can 
easily use data sou
 
 ## Job start
 
-If the Spring container start, the xml that configures the Spring namespace 
will be loaded, and the job will be automatically started.
+If the Spring container start, the `XML` that configures the Spring namespace 
will be loaded, and the job will be automatically started.

Reply via email to