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 05:39:08 UTC

[shardingsphere-elasticjob] branch master updated: Update dump for operation (#1159)

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 88ac7da  Update dump for operation (#1159)
88ac7da is described below

commit 88ac7dab648cc5a3a1e952c5319852625be3698a
Author: Liang Zhang <te...@163.com>
AuthorDate: Sun Jul 19 13:39:00 2020 +0800

    Update dump for operation (#1159)
---
 .../elasticjob-lite/operation/dump.cn.md           | 61 +++-------------------
 .../elasticjob-lite/operation/dump.en.md           | 27 +++++++++-
 2 files changed, 34 insertions(+), 54 deletions(-)

diff --git a/docs/content/user-manual/elasticjob-lite/operation/dump.cn.md b/docs/content/user-manual/elasticjob-lite/operation/dump.cn.md
index 390c68a..8f7872d 100644
--- a/docs/content/user-manual/elasticjob-lite/operation/dump.cn.md
+++ b/docs/content/user-manual/elasticjob-lite/operation/dump.cn.md
@@ -9,70 +9,25 @@ chapter = true
 由于无法在生产环境调试,通过 dump 命令可以把作业内部相关信息导出,方便开发者调试分析;
 另外为了不泄露隐私,已将相关信息中的 IP 地址以 ip1, ip2... 的形式过滤,可以在互联网上公开传输环境信息,便于进一步完善 ElasticJob。
 
-## 如何使用
+## 开启监听端口
 
-### 配置监听端口
+使用 Java 开启导出端口配置请参见[Java API 使用指南](/cn/user-manual/elasticjob-lite/usage/java-api)。
+使用 Spring 开启导出端口配置请参见[Spring 使用指南](/cn/user-manual/elasticjob-lite/usage/spring-namespace)。
 
-支持 2 种配置方式
+## 执行导出命令
 
-* Spring 方式
+导出命令完全参照 Zookeeper 的四字命令理念。
 
-```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
-                         ">
-    <!--配置作业注册中心 -->
-    <elasticjob:zookeeper id="regCenter" server-lists="yourhost:2181" namespace="dd-job" base-sleep-time-milliseconds="1000" max-sleep-time-milliseconds="3000" max-retries="3" />
-    
-    <!--配置任务快照 -->
-    <elasticjob:snapshot id="jobSnapshot" registry-center-ref="regCenter" dump-port="9999"/>    
-    
-    <!--配置作业类 -->
-    <bean id="simpleJob" class="xxx.MyElasticJob" />    
-
-    <!-- 配置作业-->
-    <elasticjob:simple id="oneOffElasticJob" job-ref="simpleJob" registry-center-ref="regCenter" cron="0/10 * * * * ?"   sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" />
-</beans>
-```
-
-* Java 方式
-
-```java
-public class JobMain {
-    
-    public static void main(final String[] args) {
-        // ...
-        SnapshotService snapshotService = new SnapshotService(regCenter, 9888);
-        snapshotService.listen();
-        // ...
-    }
-}
-```
-
-### 启动作业
-
-### 执行 dump 命令
-
-dump 命令完全参照 Zookeeper 的四字命令理念
+**导出至标准输出**
 
 ```bash
 echo "dump@jobName" | nc <任意一台作业服务器IP> 9888
 ```
 
-![dump命令](https://shardingsphere.apache.org/elasticjob/current/img/dump/dump.jpg)
+![导出命令](https://shardingsphere.apache.org/elasticjob/current/img/dump/dump.jpg)
 
-导出至文件
+**导出至文件**
 
 ```bash
 echo "dump@jobName" | nc <任意一台作业服务器IP> 9888 > job_debug.txt
 ```
-
-## 使用注意事项
-
-务必更新至 1.0.3 以上版本。
diff --git a/docs/content/user-manual/elasticjob-lite/operation/dump.en.md b/docs/content/user-manual/elasticjob-lite/operation/dump.en.md
index e5bc79d..ee9bc38 100644
--- a/docs/content/user-manual/elasticjob-lite/operation/dump.en.md
+++ b/docs/content/user-manual/elasticjob-lite/operation/dump.en.md
@@ -4,4 +4,29 @@ weight = 2
 chapter = true
 +++
 
-TODO
+Using ElasticJob may meet some distributed problem which is not easy to observe.
+
+Because of developer can not debug in production environment, ElasticJob provide `dump` command to export job runtime information for debugging.
+
+For security reason, the information dumped had already mask sensitive information, it instead of real IP address to `ip1`, `ip2` ...  
+
+## Open Listener Port
+
+Using Java API please refer to [Java API usage](/en/user-manual/elasticjob-lite/usage/java-api) for more details.
+Using Spring please refer to [Spring usage](/en/user-manual/elasticjob-lite/usage/spring-namespace) for more details.
+
+## Execute Dump
+
+**Dump to stdout**
+
+```bash
+echo "dump@jobName" | nc <job server IP address> 9888
+```
+
+![Dump](https://shardingsphere.apache.org/elasticjob/current/img/dump/dump.jpg)
+
+**Dump to file**
+
+```bash
+echo "dump@jobName" | nc <job server IP address> 9888 > job_debug.txt
+```