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/incubator-inlong-website.git


The following commit(s) were added to refs/heads/master by this push:
     new e04deedbb [INLONG-346][Manager] Add documentation for command-lin 
tools (#347)
e04deedbb is described below

commit e04deedbbe02744c083a63021455cf3e03e883fb
Author: haifxu <[email protected]>
AuthorDate: Wed Apr 13 21:57:46 2022 +0800

    [INLONG-346][Manager] Add documentation for command-lin tools (#347)
    
    Co-authored-by: v_haifxu <[email protected]>
---
 docs/user_guide/command_line_tools.md              | 307 +++++++++++++++++++++
 .../current/user_guide/command_line_tools.md       | 306 ++++++++++++++++++++
 2 files changed, 613 insertions(+)

diff --git a/docs/user_guide/command_line_tools.md 
b/docs/user_guide/command_line_tools.md
new file mode 100644
index 000000000..1ff44c8f2
--- /dev/null
+++ b/docs/user_guide/command_line_tools.md
@@ -0,0 +1,307 @@
+---
+title: Command-line Tools
+sidebar_position: 2
+---
+
+## Configuration
+
+Go to the `inlong-manager` directory , modify the following configurations of 
the `conf/application.properties` file.
+
+```
+server.host=127.0.0.1
+server.port=8080
+default.admin.user=admin
+default.admin.password=inlong
+```
+
+## Overview
+
+```
+Usage: managerctl [options] [command] [command options]
+  Options:
+    -h, --help
+      Get all command about managerctl.
+  Commands:
+    create      Create resource by json file
+      Usage: create [options]
+
+    describe      Display details of one or more resources
+      Usage: describe [options]
+
+    list      Displays main information for one or more resources
+      Usage: list [options]
+```
+
+The current command line tool supports three commands of `list` , `describe` , 
and `create`.
+
+## List
+
+```
+Usage: managerctl list [command] [command options]
+  Commands:
+    stream      Get stream main information
+      Usage: stream [options]
+        Options:
+        * -g, --group
+            inlong group id
+
+    group      Get group details
+      Usage: group [options]
+        Options:
+          -g, --group
+            inlong group id
+          -n, --num
+            the number displayed
+            Default: 10
+          -s, --status
+            Default: 0
+
+    sink      Get sink details
+      Usage: sink [options]
+        Options:
+        * -g, --group
+            group id
+        * -s, --stream
+            stream id
+
+    source      Get source details
+      Usage: source [options]
+        Options:
+        * -g, --group
+            inlong group id
+        * -s, --stream
+            inlong stream id
+          -t, --type
+            sink type
+```
+
+> \* means required
+
+The `list` command is used to showcase the core information of Inlong Group / 
Stream / Sink / Source.
+
+## Describe
+
+```
+Usage: managerctl describe [command] [command options]
+  Commands:
+    stream      Get stream details
+      Usage: stream [options]
+        Options:
+        * -g, --group
+            inlong group id
+
+    group      Get group details
+      Usage: group [options]
+        Options:
+          -g, --group
+            inlong group id
+          -n, --num
+            the number displayed
+            Default: 10
+          -s, --status
+            Default: 0
+
+    sink      Get sink details
+      Usage: sink [options]
+        Options:
+        * -g, --group
+            inlong group id
+        * -s, --stream
+            inlong stream id
+
+    source      Get source details
+      Usage: source [options]
+        Options:
+        * -g, --group
+            inlong group id
+        * -s, --stream
+            inlong stream id
+        * -t, --type
+            sink type
+```
+
+The `describe` command is used to show the details of the Inlong Group / 
Stream / Sink / Source 
+and output in JSON format.
+
+## Create
+
+```
+Usage: managerctl create [command] [command options]
+  Commands:
+    group      Create group by json file
+      Usage: group [options]
+        Options:
+        * -f, --file
+            json file
+```
+
+The `create` command does not need to submit for review , just prepare the 
configured information in the JSON file.
+
+### Json File
+
+Json files have five parts: `groupConf` 、`streamConf` 、`streamSource` 
、`streamSink` and `streamFieldList`
+
+```json
+{
+  "groupConf": {
+    "groupName": "test_group",
+    "description": "",
+    "proxyClusterId": "1",
+    "mqBaseConf": {
+      "type": "PULSAR",
+      "pulsarServiceUrl": "pulsar://127.0.0.1:6650",
+      "pulsarAdminUrl": "http://127.0.0.1:8080";,
+      "tenant": "tenant",
+      "namespace": "namespace",
+      "enableCreateResource": false
+    },
+    "sortBaseConf": {
+      "type": "FLINK",
+      "serviceUrl": "127.0.0.1:8081"
+    },
+    "zookeeperEnabled": false,
+    "dailyRecords": 10000000,
+    "peakRecords": 100000,
+    "maxLength": 10000
+  },
+  "streamConf": {
+    "name": "test_stream",
+    "description": "",
+    "dataSeparator": "|",
+    "strictlyOrdered": true,
+    "topic": "topic"
+  },
+  "streamSource": {
+    "sourceType": "KAFKA",
+    "bootstrapServers": "127.0.0.1:9092",
+    "topic": "kafka_topic",
+    "sourceName": "kafka_sourceName",
+    "dataFormat": "json",
+    "autoOffsetReset": "EARLIEST"
+  },
+  "streamSink": {
+    "sinkType": "HIVE",
+    "dbName": "test_db",
+    "jdbcUrl": "jdbc:hive2://127.0.0.1:10000",
+    "authentication": {
+      "userName": "hive",
+      "password": "hive"
+    },
+    "fileFormat": "TextFile",
+    "dataSeparator": "|",
+    "dataPath": "hdfs://127.0.0.1:9000/user/hive/warehouse/test_db",
+    "sinkFields": [
+      {
+        "id": 0,
+        "fieldType": "STRING",
+        "fieldName": "name",
+        "sourceFieldType": "STRING",
+        "sourceFieldName": "name"
+      }
+    ],
+    "tableName": "test_table",
+    "sinkName": "test",
+    "dataFormat": "json"
+  },
+  "streamFieldList": [
+    {
+      "id": 0,
+      "fieldType": "STRING",
+      "fieldName": "name",
+      "fieldComment": null,
+      "fieldValue": null
+    }
+  ]
+}
+```
+
+#### streamSource
+- Kafka
+> ```
+> "streamSource": {
+>   "sourceType": "KAFKA",
+>   "sourceName": "sourceName",
+>   "bootstrapServers": "127.0.0.1:9092",
+>   "topic": "kafka_topic",
+>   "dataFormat": "json",
+>   "autoOffsetReset": "EARLIEST"
+>  },
+> ```
+
+- MySQL Binlog
+> ```
+> "mqBaseConf": {
+>   "type": "BINLOG",
+>   "sourceName": "sourceName",
+>   "hostname": "127.0.0.1",
+>   "port" : "3306",
+>   "authentication": {
+>     "userName": "root",
+>     "password": "root"
+>   },
+>   "includeSchema": false,
+>   "serverTimezone": "UTC",
+>   "monitoredDdl": false,
+>   "allMigration": false,
+>   "dbNames": ["db1", "test_db*"],
+>   "tableNames": ["tb1", "user"*],
+> }
+> ```
+
+- File
+> ```
+> "mqBaseConf": {
+>   "type": "FILE",
+>   "sourceName": "sourceName",
+>   "ip": "127.0.0.1",
+>   "pattern" : "/a/b/*.txt",
+>   "timeOffset": "-1d"
+> }
+> ```
+
+#### streamSink
+- Hive
+> ```
+> "streamSink": {
+>   "sinkType": "HIVE",
+>   "dbName": "test_db",
+>   "jdbcUrl": "jdbc:hive2://10.160.142.179:10000",
+>   "authentication": {
+>     "userName": "hive",
+>     "password": "hive"
+>   },
+> ```
+
+- Kafka
+> ```
+> "mqBaseConf": {
+>   "type": "KAFKA",
+>   "bootstrapServers": "pulsar://100.76.43.216:6650",
+>   "topicName": "http://100.76.43.216:8080";,
+>   "dataFormat": "JSON",
+>   "boolean": false,
+> }
+> ```
+
+- ClickHouse
+> ```
+> "mqBaseConf": {
+>   "type": "CLICKHOUSE",
+>   "sinkName": "sinkName",
+>   "dbName": "db_test",
+>   "tableName": "table_test",
+>   "jdbcUrl": "jdbc:clickhouse://127.0.0.1:8123/db",
+>   "authentication": {
+>     "userName": "default",
+>     "password": "default"
+>   },
+>   "isDistributed": 1,
+>   "flushInterval": 1,
+>   "flushRecord": 10,
+>   "keyFieldNames": "keyField",
+>   "partitionFields": "partition",
+>   "partitionStrategy": "BALANCE",
+>   "retryTimes": 3,
+>   "needCreated": false
+> }
+> ```
\ No newline at end of file
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/user_guide/command_line_tools.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/user_guide/command_line_tools.md
new file mode 100644
index 000000000..8aef5cdcf
--- /dev/null
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/user_guide/command_line_tools.md
@@ -0,0 +1,306 @@
+---
+title: 命令行工具 
+sidebar_position: 2
+---
+
+## 配置
+
+前往 `inlong-manager` 目录,修改 `conf/application.properties` 文件的以下配置即可。
+
+```
+server.host=127.0.0.1
+server.port=8080
+default.admin.user=admin
+default.admin.password=inlong
+```
+
+## 总览
+
+```
+Usage: managerctl [options] [command] [command options]
+  Options:
+    -h, --help
+      Get all command about managerctl.
+  Commands:
+    create      Create resource by json file
+      Usage: create [options]
+
+    describe      Display details of one or more resources
+      Usage: describe [options]
+
+    list      Displays main information for one or more resources
+      Usage: list [options]
+```
+
+目前命令行工具支持 `list`、`describe` 以及 `create` 三个命令。
+
+## List
+
+```
+Usage: managerctl list [command] [command options]
+  Commands:
+    stream      Get stream main information
+      Usage: stream [options]
+        Options:
+        * -g, --group
+            inlong group id
+
+    group      Get group details
+      Usage: group [options]
+        Options:
+          -g, --group
+            inlong group id
+          -n, --num
+            the number displayed
+            Default: 10
+          -s, --status
+            Default: 0
+
+    sink      Get sink details
+      Usage: sink [options]
+        Options:
+        * -g, --group
+            group id
+        * -s, --stream
+            stream id
+
+    source      Get source details
+      Usage: source [options]
+        Options:
+        * -g, --group
+            inlong group id
+        * -s, --stream
+            inlong stream id
+          -t, --type
+            sink type
+```
+
+> \* 号为必选项
+
+`list` 用于展示inlong group / stream / sink / source 的核心信息。
+
+## Describe
+
+```
+Usage: managerctl describe [command] [command options]
+  Commands:
+    stream      Get stream details
+      Usage: stream [options]
+        Options:
+        * -g, --group
+            inlong group id
+
+    group      Get group details
+      Usage: group [options]
+        Options:
+          -g, --group
+            inlong group id
+          -n, --num
+            the number displayed
+            Default: 10
+          -s, --status
+            Default: 0
+
+    sink      Get sink details
+      Usage: sink [options]
+        Options:
+        * -g, --group
+            inlong group id
+        * -s, --stream
+            inlong stream id
+
+    source      Get source details
+      Usage: source [options]
+        Options:
+        * -g, --group
+            inlong group id
+        * -s, --stream
+            inlong stream id
+        * -t, --type
+            sink type
+```
+
+`describe` 用于展示inlong group / stream / sink / source 的详细信息,并以Json格式输出。
+
+## Create
+
+```
+Usage: managerctl create [command] [command options]
+  Commands:
+    group      Create group by json file
+      Usage: group [options]
+        Options:
+        * -f, --file
+            json file
+```
+
+`create` 不需要申请审核等步骤,只需将所配置信息准备在Json文件中即可。
+
+### Json文件
+
+Json 文件主要有五个部分: `groupConf` 、`streamConf` 、`streamSource` 、`streamSink` 以及 
`streamFieldList`
+
+```json
+{
+  "groupConf": {
+    "groupName": "test_group",
+    "description": "",
+    "proxyClusterId": "1",
+    "mqBaseConf": {
+      "type": "PULSAR",
+      "pulsarServiceUrl": "pulsar://127.0.0.1:6650",
+      "pulsarAdminUrl": "http://127.0.0.1:8080";,
+      "tenant": "tenant",
+      "namespace": "namespace",
+      "enableCreateResource": false
+    },
+    "sortBaseConf": {
+      "type": "FLINK",
+      "serviceUrl": "127.0.0.1:8081"
+    },
+    "zookeeperEnabled": false,
+    "dailyRecords": 10000000,
+    "peakRecords": 100000,
+    "maxLength": 10000
+  },
+  "streamConf": {
+    "name": "test_stream",
+    "description": "",
+    "dataSeparator": "|",
+    "strictlyOrdered": true,
+    "topic": "topic"
+  },
+  "streamSource": {
+    "sourceType": "KAFKA",
+    "bootstrapServers": "127.0.0.1:9092",
+    "topic": "kafka_topic",
+    "sourceName": "kafka_sourceName",
+    "dataFormat": "json",
+    "autoOffsetReset": "EARLIEST"
+  },
+  "streamSink": {
+    "sinkType": "HIVE",
+    "dbName": "test_db",
+    "jdbcUrl": "jdbc:hive2://127.0.0.1:10000",
+    "authentication": {
+      "userName": "hive",
+      "password": "hive"
+    },
+    "fileFormat": "TextFile",
+    "dataSeparator": "|",
+    "dataPath": "hdfs://127.0.0.1:9000/user/hive/warehouse/test_db",
+    "sinkFields": [
+      {
+        "id": 0,
+        "fieldType": "STRING",
+        "fieldName": "name",
+        "sourceFieldType": "STRING",
+        "sourceFieldName": "name"
+      }
+    ],
+    "tableName": "test_table",
+    "sinkName": "test",
+    "dataFormat": "json"
+  },
+  "streamFieldList": [
+    {
+      "id": 0,
+      "fieldType": "STRING",
+      "fieldName": "name",
+      "fieldComment": null,
+      "fieldValue": null
+    }
+  ]
+}
+```
+
+#### streamSource
+- Kafka
+> ```
+> "streamSource": {
+>   "sourceType": "KAFKA",
+>   "sourceName": "sourceName",
+>   "bootstrapServers": "127.0.0.1:9092",
+>   "topic": "kafka_topic",
+>   "dataFormat": "json",
+>   "autoOffsetReset": "EARLIEST"
+>  },
+> ```
+
+- MySQL Binlog
+> ```
+> "mqBaseConf": {
+>   "type": "BINLOG",
+>   "sourceName": "sourceName",
+>   "hostname": "127.0.0.1",
+>   "port" : "3306",
+>   "authentication": {
+>     "userName": "root",
+>     "password": "root"
+>   },
+>   "includeSchema": false,
+>   "serverTimezone": "UTC",
+>   "monitoredDdl": false,
+>   "allMigration": false,
+>   "dbNames": ["db1", "test_db*"],
+>   "tableNames": ["tb1", "user"*],
+> }
+> ```
+
+- File
+> ```
+> "mqBaseConf": {
+>   "type": "FILE",
+>   "sourceName": "sourceName",
+>   "ip": "127.0.0.1",
+>   "pattern" : "/a/b/*.txt",
+>   "timeOffset": "-1d"
+> }
+> ```
+
+#### streamSink
+- Hive
+> ```
+> "streamSink": {
+>   "sinkType": "HIVE",
+>   "dbName": "test_db",
+>   "jdbcUrl": "jdbc:hive2://127.0.0.1:10000",
+>   "authentication": {
+>     "userName": "hive",
+>     "password": "hive"
+>   },
+> ```
+
+- Kafka
+> ```
+> "mqBaseConf": {
+>   "type": "KAFKA",
+>   "bootstrapServers": "pulsar://127.0.0.1:6650",
+>   "topicName": "http://100.76.43.216:8080";,
+>   "dataFormat": "JSON",
+>   "boolean": false,
+> }
+> ```
+
+- ClickHouse
+> ```
+> "mqBaseConf": {
+>   "type": "CLICKHOUSE",
+>   "sinkName": "sinkName",
+>   "dbName": "db_test",
+>   "tableName": "table_test",
+>   "jdbcUrl": "jdbc:clickhouse://127.0.0.1:8123/db",
+>   "authentication": {
+>     "userName": "default",
+>     "password": "default"
+>   },
+>   "isDistributed": 1,
+>   "flushInterval": 1,
+>   "flushRecord": 10,
+>   "keyFieldNames": "keyField",
+>   "partitionFields": "partition",
+>   "partitionStrategy": "BALANCE",
+>   "retryTimes": 3,
+>   "needCreated": false
+> }
+> ```
\ No newline at end of file

Reply via email to