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.git
The following commit(s) were added to refs/heads/master by this push:
new c85500cfc [INLONG-6744][Dashboard] Hive sink supports selecting hive
nodes (#6757)
c85500cfc is described below
commit c85500cfcb97e39202fbeea7950664c3bc146307
Author: Lizhen <[email protected]>
AuthorDate: Tue Dec 6 20:44:36 2022 +0800
[INLONG-6744][Dashboard] Hive sink supports selecting hive nodes (#6757)
---
inlong-dashboard/src/locales/cn.json | 5 +--
inlong-dashboard/src/locales/en.json | 5 +--
inlong-dashboard/src/metas/nodes/defaults/Hive.ts | 8 ++--
inlong-dashboard/src/metas/sinks/defaults/Hive.ts | 51 ++++++++++-------------
4 files changed, 29 insertions(+), 40 deletions(-)
diff --git a/inlong-dashboard/src/locales/cn.json
b/inlong-dashboard/src/locales/cn.json
index 93ae6fdae..628b8f203 100644
--- a/inlong-dashboard/src/locales/cn.json
+++ b/inlong-dashboard/src/locales/cn.json
@@ -121,15 +121,12 @@
"meta.Sinks.Hive.ConnectionTest": "测试连接",
"meta.Sinks.Hive.ConnectionSucceeded": "连接成功",
"meta.Sinks.Hive.ConnectionFailed": "连接失败",
- "meta.Sinks.Hive.DataPath": "数据路径",
- "meta.Sinks.Hive.ConfDir": "配置路径",
- "meta.Sinks.Hive.ConfDirHelp": "将 Hive 集群的 hive-site.xml 文件上传到 HDFS
的某个目录下,如:/user/hive/conf",
- "meta.Sinks.DataPathHelp":
"DB的存储路径,不包括表名,如:hdfs://127.0.0.1:9000/warehouse/inlong.db",
"meta.Sinks.Hive.FieldName": "字段名",
"meta.Sinks.Hive.FieldType": "字段类型",
"meta.Sinks.Hive.FieldDescription": "字段描述",
"meta.Sinks.Hive.IsMetaField": "是否为元字段",
"meta.Sinks.Hive.FieldFormat": "字段格式",
+ "meta.Sinks.Hive.DataNodeName": "数据节点",
"meta.Sinks.ClickHouse.DbName": "DB名称",
"meta.Sinks.ClickHouse.TableName": "表名称",
"meta.Sinks.ClickHouse.FlushInterval": "刷新的间隔",
diff --git a/inlong-dashboard/src/locales/en.json
b/inlong-dashboard/src/locales/en.json
index 0759809c7..af7edc492 100644
--- a/inlong-dashboard/src/locales/en.json
+++ b/inlong-dashboard/src/locales/en.json
@@ -121,15 +121,12 @@
"meta.Sinks.Hive.ConnectionTest": "Test connection",
"meta.Sinks.Hive.ConnectionSucceeded": "Connection succeeded",
"meta.Sinks.Hive.ConnectionFailed": "Connection failed",
- "meta.Sinks.Hive.DataPath": "DataPath",
- "meta.Sinks.Hive.ConfDir": "ConfDir",
- "meta.Sinks.Hive.ConfDirHelp": "Upload the hive-site.xml file of the Hive
cluster to a directory in HDFS, such as: /user/hive/conf",
- "meta.Sinks.DataPathHelp": "Storage path of the DB, excluding the table
name, such as: hdfs://127.0.0.1:9000/warehouse/inlong.db",
"meta.Sinks.Hive.FieldName": "FieldName",
"meta.Sinks.Hive.FieldType": "FieldType",
"meta.Sinks.Hive.FieldDescription": "Field description",
"meta.Sinks.Hive.IsMetaField": "IsMetaField",
"meta.Sinks.Hive.FieldFormat": "FieldFormat",
+ "meta.Sinks.Hive.DataNodeName": "DataNode",
"meta.Sinks.ClickHouse.DbName": "DbName",
"meta.Sinks.ClickHouse.TableName": "TableName",
"meta.Sinks.ClickHouse.FlushInterval": "FlushInterval",
diff --git a/inlong-dashboard/src/metas/nodes/defaults/Hive.ts
b/inlong-dashboard/src/metas/nodes/defaults/Hive.ts
index bfe11b4c0..d10b9befb 100644
--- a/inlong-dashboard/src/metas/nodes/defaults/Hive.ts
+++ b/inlong-dashboard/src/metas/nodes/defaults/Hive.ts
@@ -38,18 +38,18 @@ export default class HiveNode extends NodeInfo implements
DataWithBackend, Rende
@FieldDecorator({
type: 'input',
rules: [{ required: true }],
- tooltip: i18n.t('meta.Sinks.DataPathHelp'),
+ tooltip: i18n.t('meta.Nodes.Hive.DataPathHelp'),
initialValue: 'hdfs://127.0.0.1:9000/user/hive/warehouse/default',
})
- @I18n('meta.Sinks.Hive.DataPath')
+ @I18n('meta.Nodes.Hive.DataPath')
dataPath: string;
@FieldDecorator({
type: 'input',
rules: [{ required: true }],
- tooltip: i18n.t('meta.Sinks.Hive.ConfDirHelp'),
+ tooltip: i18n.t('meta.Nodes.Hive.ConfDirHelp'),
initialValue: '/usr/hive/conf',
})
- @I18n('meta.Sinks.Hive.ConfDir')
+ @I18n('meta.Nodes.Hive.ConfDir')
hiveConfDir: string;
}
diff --git a/inlong-dashboard/src/metas/sinks/defaults/Hive.ts
b/inlong-dashboard/src/metas/sinks/defaults/Hive.ts
index 71ef8b53d..89cb25a8e 100644
--- a/inlong-dashboard/src/metas/sinks/defaults/Hive.ts
+++ b/inlong-dashboard/src/metas/sinks/defaults/Hive.ts
@@ -117,39 +117,34 @@ export default class HiveSink extends SinkInfo implements
DataWithBackend, Rende
password: string;
@FieldDecorator({
- type: 'input',
- rules: [{ required: true }],
- props: values => ({
- disabled: [110, 130].includes(values?.status),
- placeholder: 'jdbc:hive2://127.0.0.1:10000',
- }),
- })
- @I18n('JDBC URL')
- jdbcUrl: string;
-
- @FieldDecorator({
- type: 'input',
- rules: [{ required: true }],
- tooltip: i18n.t('meta.Sinks.DataPathHelp'),
- props: values => ({
- disabled: [110, 130].includes(values?.status),
- placeholder: 'hdfs://127.0.0.1:9000/user/hive/warehouse/default',
- }),
- })
- @I18n('meta.Sinks.Hive.DataPath')
- dataPath: string;
-
- @FieldDecorator({
- type: 'input',
+ type: 'select',
rules: [{ required: true }],
- tooltip: i18n.t('meta.Sinks.Hive.ConfDirHelp'),
props: values => ({
+ showSearch: true,
disabled: [110, 130].includes(values?.status),
- placeholder: '/usr/hive/conf',
+ options: {
+ requestService: keyword => ({
+ url: '/node/list',
+ method: 'POST',
+ data: {
+ keyword,
+ type: 'HIVE',
+ pageNum: 1,
+ pageSize: 20,
+ },
+ }),
+ requestParams: {
+ formatResult: result =>
+ result?.list?.map(item => ({
+ label: item.name,
+ value: item.name,
+ })),
+ },
+ },
}),
})
- @I18n('meta.Sinks.Hive.ConfDir')
- hiveConfDir: string;
+ @I18n('meta.Sinks.Hive.DataNodeName')
+ dataNodeName: string;
@FieldDecorator({
type: 'radio',