You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2023/03/02 11:24:58 UTC
[inlong] branch master updated: [INLONG-7493][Dashboard] Support hudi node management (#7498)
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 a1ec538d7 [INLONG-7493][Dashboard] Support hudi node management (#7498)
a1ec538d7 is described below
commit a1ec538d7b452fa363fef72c598b80e35d70140b
Author: Lizhen <88...@users.noreply.github.com>
AuthorDate: Thu Mar 2 19:24:51 2023 +0800
[INLONG-7493][Dashboard] Support hudi node management (#7498)
---
inlong-dashboard/src/locales/cn.json | 5 ++
inlong-dashboard/src/locales/en.json | 5 ++
inlong-dashboard/src/metas/nodes/defaults/Hudi.ts | 84 ++++++++++++++++++++++
inlong-dashboard/src/metas/nodes/defaults/index.ts | 5 ++
inlong-dashboard/src/metas/sinks/defaults/Hudi.ts | 22 ++----
5 files changed, 104 insertions(+), 17 deletions(-)
diff --git a/inlong-dashboard/src/locales/cn.json b/inlong-dashboard/src/locales/cn.json
index a650e674b..955f7fc66 100644
--- a/inlong-dashboard/src/locales/cn.json
+++ b/inlong-dashboard/src/locales/cn.json
@@ -482,6 +482,11 @@
"meta.Nodes.StarRocks.Username": "用户名",
"meta.Nodes.StarRocks.Password": "密码",
"meta.Nodes.StarRocks.Url": "地址",
+ "meta.Nodes.Hudi.Username": "用户名",
+ "meta.Nodes.Hudi.Password": "密码",
+ "meta.Nodes.Hudi.Url": "地址",
+ "meta.Nodes.Hudi.CatalogType": "目录类型",
+ "meta.Nodes.Hudi.Warehouse": "仓库路径",
"components.EditableTable.NewLine": "新增一行",
"components.FormGenerator.plugins.PleaseChoose": "请选择",
"components.FormGenerator.plugins.PleaseInput": "请输入",
diff --git a/inlong-dashboard/src/locales/en.json b/inlong-dashboard/src/locales/en.json
index ef9a1b956..ac6d6d44e 100644
--- a/inlong-dashboard/src/locales/en.json
+++ b/inlong-dashboard/src/locales/en.json
@@ -482,6 +482,11 @@
"meta.Nodes.StarRocks.Username": "Username",
"meta.Nodes.StarRocks.Password": "Password",
"meta.Nodes.StarRocks.Url": "URL",
+ "meta.Nodes.Hudi.Username": "Username",
+ "meta.Nodes.Hudi.Password": "Password",
+ "meta.Nodes.Hudi.Url": "URL",
+ "meta.Nodes.Hudi.CatalogType": "Catalog Type",
+ "meta.Nodes.Hudi.Warehouse": "Warehouse",
"components.EditableTable.NewLine": "New line",
"components.FormGenerator.plugins.PleaseChoose": "Please select",
"components.FormGenerator.plugins.PleaseInput": "Please input",
diff --git a/inlong-dashboard/src/metas/nodes/defaults/Hudi.ts b/inlong-dashboard/src/metas/nodes/defaults/Hudi.ts
new file mode 100644
index 000000000..f21a47171
--- /dev/null
+++ b/inlong-dashboard/src/metas/nodes/defaults/Hudi.ts
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { DataWithBackend } from '@/metas/DataWithBackend';
+import { RenderRow } from '@/metas/RenderRow';
+import { RenderList } from '@/metas/RenderList';
+import { NodeInfo } from '../common/NodeInfo';
+
+const { I18n } = DataWithBackend;
+const { FieldDecorator } = RenderRow;
+
+export default class HudiNode extends NodeInfo implements DataWithBackend, RenderRow, RenderList {
+ @FieldDecorator({
+ type: 'input',
+ rules: [{ required: true }],
+ })
+ @I18n('meta.Nodes.Hudi.Username')
+ username: string;
+
+ @FieldDecorator({
+ type: 'password',
+ rules: [{ required: true }],
+ })
+ @I18n('meta.Nodes.Hudi.Password')
+ token: string;
+
+ @FieldDecorator({
+ type: 'input',
+ rules: [{ required: true }],
+ props: values => ({
+ disabled: [110, 130].includes(values?.status),
+ placeholder: 'thrift://127.0.0.1:9083',
+ }),
+ })
+ @I18n('meta.Nodes.Hudi.Url')
+ url: string;
+
+ @FieldDecorator({
+ type: 'input',
+ rules: [{ required: true }],
+ props: values => ({
+ disabled: [110, 130].includes(values?.status),
+ placeholder: 'hdfs://127.0.0.1:9000/user/hudi/warehouse',
+ }),
+ })
+ @I18n('meta.Nodes.Hudi.Warehouse')
+ warehouse: string;
+
+ @FieldDecorator({
+ type: 'select',
+ initialValue: 'HIVE',
+ props: values => ({
+ disabled: [110, 130].includes(values?.status),
+ options: [
+ {
+ label: 'HIVE',
+ value: 'HIVE',
+ },
+ {
+ label: 'HADOOP',
+ value: 'HADOOP',
+ },
+ ],
+ }),
+ })
+ @I18n('meta.Nodes.Hudi.CatalogType')
+ catalogType: string;
+}
diff --git a/inlong-dashboard/src/metas/nodes/defaults/index.ts b/inlong-dashboard/src/metas/nodes/defaults/index.ts
index 29234be9a..4b7208d60 100644
--- a/inlong-dashboard/src/metas/nodes/defaults/index.ts
+++ b/inlong-dashboard/src/metas/nodes/defaults/index.ts
@@ -41,6 +41,11 @@ export const allDefaultNodes: MetaExportWithBackendList<NodeMetaType> = [
value: 'HIVE',
LoadEntity: () => import('./Hive'),
},
+ {
+ label: 'Hudi',
+ value: 'HUDI',
+ LoadEntity: () => import('./Hudi'),
+ },
{
label: 'Iceberg',
value: 'ICEBERG',
diff --git a/inlong-dashboard/src/metas/sinks/defaults/Hudi.ts b/inlong-dashboard/src/metas/sinks/defaults/Hudi.ts
index 15f173a18..786d129e0 100644
--- a/inlong-dashboard/src/metas/sinks/defaults/Hudi.ts
+++ b/inlong-dashboard/src/metas/sinks/defaults/Hudi.ts
@@ -24,6 +24,7 @@ import i18n from '@/i18n';
import EditableTable from '@/components/EditableTable';
import { sourceFields } from '../common/sourceFields';
import { SinkInfo } from '../common/SinkInfo';
+import NodeSelect from '@/components/NodeSelect';
const { I18n } = DataWithBackend;
const { FieldDecorator } = RenderRow;
@@ -151,28 +152,15 @@ export default class HudiSink extends SinkInfo implements DataWithBackend, Rende
enableCreateResource: number;
@FieldDecorator({
- type: 'input',
+ type: NodeSelect,
rules: [{ required: true }],
props: values => ({
disabled: [110, 130].includes(values?.status),
- placeholder: 'thrift://127.0.0.1:9083',
+ nodeType: 'HUDI',
}),
})
- @ColumnDecorator()
- @I18n('Catalog URI')
- catalogUri: string;
-
- @FieldDecorator({
- type: 'input',
- rules: [{ required: true }],
- props: values => ({
- disabled: [110, 130].includes(values?.status),
- placeholder: 'hdfs://127.0.0.1:9000/user/hudi/warehouse',
- }),
- })
- @ColumnDecorator()
- @I18n('meta.Sinks.Hudi.Warehouse')
- warehouse: string;
+ @I18n('meta.Sinks.DataNodeName')
+ dataNodeName: string;
@FieldDecorator({
type: 'select',