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

dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 4ab813429c [INLONG-685][Doc] Optimize agent plugin documentation (#686)
4ab813429c is described below

commit 4ab813429cd198acea3fdc9e35a2f176ff5b6747
Author: haifxu <[email protected]>
AuthorDate: Thu Feb 16 15:56:14 2023 +0800

    [INLONG-685][Doc] Optimize agent plugin documentation (#686)
---
 .../how_to_extend_data_node_for_manager.md         |   2 +-
 .../how_to_extend_data_node_for_sort.md            |   2 +-
 .../how_to_write_plugin_agent.md                   |  33 +++++++++++++++++++-
 .../how_to_write_plugin_dashboard.md               |   2 +-
 .../how_to_write_plugin_dataproxy.md               |   2 +-
 docs/design_and_concept/img/Agent_Flow.png         | Bin 28915 -> 34510 bytes
 docs/design_and_concept/the_format_in_inlong.md    |   2 +-
 .../how_to_extend_data_node_for_manager.md         |   2 +-
 .../how_to_extend_data_node_for_sort.md            |   2 +-
 .../how_to_write_plugin_agent.md                   |  34 ++++++++++++++++++++-
 .../how_to_write_plugin_dashboard.md               |   2 +-
 .../how_to_write_plugin_dataproxy.md               |   2 +-
 .../current/design_and_concept/img/Agent_Flow.png  | Bin 28915 -> 34510 bytes
 .../design_and_concept/the_format_in_inlong.md     |   2 +-
 14 files changed, 75 insertions(+), 12 deletions(-)

diff --git a/docs/design_and_concept/how_to_extend_data_node_for_manager.md 
b/docs/design_and_concept/how_to_extend_data_node_for_manager.md
index db5aad4fcc..763901fc3e 100644
--- a/docs/design_and_concept/how_to_extend_data_node_for_manager.md
+++ b/docs/design_and_concept/how_to_extend_data_node_for_manager.md
@@ -1,6 +1,6 @@
 ---
 title: Manager Plugin
-sidebar_position: 5
+sidebar_position: 6
 ---
 
 ## Overview
diff --git a/docs/design_and_concept/how_to_extend_data_node_for_sort.md 
b/docs/design_and_concept/how_to_extend_data_node_for_sort.md
index 9619237de0..bc2276b46f 100644
--- a/docs/design_and_concept/how_to_extend_data_node_for_sort.md
+++ b/docs/design_and_concept/how_to_extend_data_node_for_sort.md
@@ -1,6 +1,6 @@
 ---
 title: Sort Plugin
-sidebar_position: 3
+sidebar_position: 4
 ---
 
 ## Overview
diff --git a/docs/design_and_concept/how_to_write_plugin_agent.md 
b/docs/design_and_concept/how_to_write_plugin_agent.md
index 7e360c5717..6d329f4c89 100644
--- a/docs/design_and_concept/how_to_write_plugin_agent.md
+++ b/docs/design_and_concept/how_to_write_plugin_agent.md
@@ -1,6 +1,6 @@
 ---
 title: Agent Plugin
-sidebar_position: 2
+sidebar_position: 3
 ---
 
 ## Overview
@@ -27,7 +27,11 @@ When extending an Agent plugin, you need to develop specific 
Source, Reader and
 ## Demonstration
 
 The Job/Task/Reader/Sink/Channel concept introduced above can be represented 
by the following figure:
+
+<div align="center">
+
 ![](img/Agent_Flow.png)
+</div>
 
 - The user submits a Job (via the manager), and the Job defines the Source, 
Channel, and Sink that need to be used (defined by the fully qualified name of 
the class)
 - The framework starts the Job and creates the Source through the reflection 
mechanism
@@ -135,6 +139,33 @@ The `Source` interface functions as follows:
 - `split`: Called by a single job to generate multiple Readers, for example: a 
read file task, matching multiple files in a folder, when the job starts, it 
will specify TextFileSource as the Source entry,
   After calling the split function, TextFileSource will detect how many paths 
match the path matching expression in the folder set by the user, and generate 
TextFileReader to read
 
+### Job
+
+```java
+public class xxJob {
+    
+  private String username;
+  private String password;
+  private String hostname;
+  private String port;
+  private String database;
+  // ...
+  
+  public static class xxJobConfig {
+
+    private String username;
+    private String password;
+    private String hostname;
+    private String port;
+    private String database;
+    // ...
+  }
+}
+
+```
+
+- The fields in `config` come from the manager and need to be consistent with 
the manager fields. When submitting the task, convert it into the corresponding 
job
+
 
 ## Job Definition
 
diff --git a/docs/design_and_concept/how_to_write_plugin_dashboard.md 
b/docs/design_and_concept/how_to_write_plugin_dashboard.md
index ae68db52c4..a037b90711 100644
--- a/docs/design_and_concept/how_to_write_plugin_dashboard.md
+++ b/docs/design_and_concept/how_to_write_plugin_dashboard.md
@@ -1,6 +1,6 @@
 ---
 title: Dashboard Plugin
-sidebar_position: 4
+sidebar_position: 5
 ---
 
 ## Overview
diff --git a/docs/design_and_concept/how_to_write_plugin_dataproxy.md 
b/docs/design_and_concept/how_to_write_plugin_dataproxy.md
index 164b35bb51..7f9aced462 100644
--- a/docs/design_and_concept/how_to_write_plugin_dataproxy.md
+++ b/docs/design_and_concept/how_to_write_plugin_dataproxy.md
@@ -1,6 +1,6 @@
 ---
 title: DataProxy Plugin
-sidebar_position: 6
+sidebar_position: 7
 ---
 
 ## Overview
diff --git a/docs/design_and_concept/img/Agent_Flow.png 
b/docs/design_and_concept/img/Agent_Flow.png
index 4915d066d4..208e7298d9 100644
Binary files a/docs/design_and_concept/img/Agent_Flow.png and 
b/docs/design_and_concept/img/Agent_Flow.png differ
diff --git a/docs/design_and_concept/the_format_in_inlong.md 
b/docs/design_and_concept/the_format_in_inlong.md
index 94d107ee62..cba871428e 100644
--- a/docs/design_and_concept/the_format_in_inlong.md
+++ b/docs/design_and_concept/the_format_in_inlong.md
@@ -1,6 +1,6 @@
 ---
 title: Format 
-sidebar_position: 7
+sidebar_position: 2
 ---
 
 ## What is format ?
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/how_to_extend_data_node_for_manager.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/how_to_extend_data_node_for_manager.md
index b27d0c1b2c..7b07d0e935 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/how_to_extend_data_node_for_manager.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/how_to_extend_data_node_for_manager.md
@@ -1,6 +1,6 @@
 ---
 title: Manager 插件
-sidebar_position: 5
+sidebar_position: 6
 ---
 
 ## 总览
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/how_to_extend_data_node_for_sort.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/how_to_extend_data_node_for_sort.md
index b4ca0b96a4..470c504db0 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/how_to_extend_data_node_for_sort.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/how_to_extend_data_node_for_sort.md
@@ -1,6 +1,6 @@
 ---
 title: Sort 插件
-sidebar_position: 3
+sidebar_position: 4
 ---
 
 ## 总览
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/how_to_write_plugin_agent.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/how_to_write_plugin_agent.md
index e89a69cfba..c714dcb3e2 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/how_to_write_plugin_agent.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/how_to_write_plugin_agent.md
@@ -1,6 +1,6 @@
 ---
 title: Agent 插件
-sidebar_position: 2
+sidebar_position: 3
 ---
 
 ## 总览
@@ -25,7 +25,11 @@ InLong Agent 是一个数据采集框架,采用 `Job` + `Task` 架构模型,
 ## 流程图示
 
 上述介绍的 Job/Task/Reader/Sink/Channel 概念可以用下图表示:
+
+<div align="center">
+
 ![](img/Agent_Flow.png)
+</div>
 
 - 用户提交 Job(通过 manager),Job 中定义了需要使用的 Source, Channel, Sink(通过类的全限定名定义)
 - 框架启动 Job,通过反射机制创建出 Source
@@ -135,6 +139,34 @@ public interface Source {
   调用 split 函数后,TextFileSource 会检测用户设置的文件夹内有多少符合路径匹配表达式的路径,并生成 TextFileReader 读取
   
 
+### Job
+
+```java
+public class xxJob {
+    
+  private String username;
+  private String password;
+  private String hostname;
+  private String port;
+  private String database;
+  // ...
+  
+  public static class xxJobConfig {
+
+    private String username;
+    private String password;
+    private String hostname;
+    private String port;
+    private String database;
+    // ...
+  }
+}
+
+```
+
+- `config` 中的字段来自 manager,需要与 manager 字段保持一致,在任务配置时,将其转换成对应的 job
+
+
 ## 任务配置
 
 代码写好了,有没有想过框架是怎么找到插件的入口类的?框架是如何加载插件的呢?
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/how_to_write_plugin_dashboard.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/how_to_write_plugin_dashboard.md
index f09abcf1c0..eb17aa09da 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/how_to_write_plugin_dashboard.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/how_to_write_plugin_dashboard.md
@@ -1,6 +1,6 @@
 ---
 title: Dashboard 插件
-sidebar_position: 4
+sidebar_position: 5
 ---
 
 ## 总览
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/how_to_write_plugin_dataproxy.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/how_to_write_plugin_dataproxy.md
index f9eaa66cf2..6cdc32766d 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/how_to_write_plugin_dataproxy.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/how_to_write_plugin_dataproxy.md
@@ -1,6 +1,6 @@
 ---
 title: DataProxy 插件
-sidebar_position: 6
+sidebar_position: 7
 ---
 
 ## 总览
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/img/Agent_Flow.png
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/img/Agent_Flow.png
index 4915d066d4..208e7298d9 100644
Binary files 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/img/Agent_Flow.png
 and 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/img/Agent_Flow.png
 differ
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/the_format_in_inlong.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/the_format_in_inlong.md
index 00c8b2c14a..228901cbd2 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/the_format_in_inlong.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/design_and_concept/the_format_in_inlong.md
@@ -1,6 +1,6 @@
 ---
 title: Format
-sidebar_position: 7
+sidebar_position: 2
 ---
 
 ## 什么是 Format?

Reply via email to