命令行工具
目前命令行工具支持 、describe
以及 create
三个命令。
前往 inlong-manager
目录,修改 conf/application.properties
文件的以下配置即可。
server.host=127.0.0.1
server.port=8080
default.admin.user=admin
default.admin.password=inlong
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
( CREATE | REJECTED | INITIALIZING | OPERATING |
STARTED | FAILED | STOPPED | FINISHED | DELETED )
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
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
* -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
不需要申请审核等步骤,只需将所配置信息准备在Json文件中即可。
Json 文件主要有五个部分: groupConf
、streamConf
、streamSource
、streamSink
以及 streamFieldList
{
"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
-
"streamSource": {
"sourceType": "KAFKA",
"sourceName": "sourceName",
"bootstrapServers": "127.0.0.1:9092",
"topic": "kafka_topic",
"dataFormat": "json",
"autoOffsetReset": "EARLIEST"
},
MySQL Binlog
File
streamSink
Hive
-
"mqBaseConf": {
"type": "KAFKA",
"bootstrapServers": "pulsar://127.0.0.1:6650",
"topicName": "http://100.76.43.216:8080",
"dataFormat": "JSON",
"boolean": false,
}
ClickHouse