Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#5185] feature(ui): support paimon JDBC and hive backend in WEB UI (#5195)

Qian Xiad75c20190913
diff --git a/web/web/src/app/metalakes/metalake/rightContent/CreateCatalogDialog.js b/web/web/src/app/metalakes/metalake/rightContent/CreateCatalogDialog.js
index 95a5d64504..aa836886ae 100644
--- a/web/web/src/app/metalakes/metalake/rightContent/CreateCatalogDialog.js
+++ b/web/web/src/app/metalakes/metalake/rightContent/CreateCatalogDialog.js
@@ -179,7 +179,7 @@ const CreateCatalogDialog = props => {
const parentField = innerProps.find(i => i.key === field.parentField)
const check =
- (parentField && parentField.value === field.hide) ||
+ (parentField && field.hide.includes(parentField.value)) ||
(field.parentField === 'authentication.type' && parentField === undefined)
return check
@@ -232,7 +232,7 @@ const CreateCatalogDialog = props => {
if (
propItems[0]?.key === 'catalog-backend' &&
propItems[0]?.value === 'hive' &&
- providerSelect === 'lakehouse-iceberg'
+ ['lakehouse-iceberg', 'lakehouse-paimon'].includes(providerSelect)
) {
nextProps = propItems.filter(item => !['jdbc-driver', 'jdbc-user', 'jdbc-password'].includes(item.key))
} else if (
@@ -278,7 +278,11 @@ const CreateCatalogDialog = props => {
...others
} = prevProperties
- if (catalogBackend && catalogBackend === 'hive' && providerSelect === 'lakehouse-iceberg') {
+ if (
+ catalogBackend &&
+ catalogBackend === 'hive' &&
+ ['lakehouse-iceberg', 'lakehouse-paimon'].includes(providerSelect)
+ ) {
properties = {
'catalog-backend': catalogBackend,
uri: uri,
diff --git a/web/web/src/lib/utils/initial.js b/web/web/src/lib/utils/initial.js
index e916fcd5ef..3517ecd2ec 100644
--- a/web/web/src/lib/utils/initial.js
+++ b/web/web/src/lib/utils/initial.js
@@ -89,7 +89,7 @@ export const providers = [
value: '',
required: true,
parentField: 'catalog-backend',
- hide: 'hive',
+ hide: ['hive'],
description: `"com.mysql.jdbc.Driver" or "com.mysql.cj.jdbc.Driver" for MySQL, "org.postgresql.Driver" for PostgreSQL`
},
{
@@ -97,14 +97,14 @@ export const providers = [
value: '',
required: true,
parentField: 'catalog-backend',
- hide: 'hive'
+ hide: ['hive']
},
{
key: 'jdbc-password',
value: '',
required: true,
parentField: 'catalog-backend',
- hide: 'hive'
+ hide: ['hive']
},
{
key: 'authentication.type',
@@ -121,7 +121,7 @@ export const providers = [
required: true,
description: 'The principal of the Kerberos authentication.',
parentField: 'authentication.type',
- hide: 'simple'
+ hide: ['simple']
},
{
key: 'authentication.kerberos.keytab-uri',
@@ -129,7 +129,7 @@ export const providers = [
required: true,
description: 'The URI of The keytab for the Kerberos authentication.',
parentField: 'authentication.type',
- hide: 'simple'
+ hide: ['simple']
}
]
},
@@ -231,7 +231,8 @@ export const providers = [
value: 'filesystem',
defaultValue: 'filesystem',
required: true,
- description: 'Only supports "filesystem" now.'
+ description: 'Only supports "filesystem" now.',
+ select: ['filesystem', 'hive', 'jdbc']
},
{
key: 'uri',
@@ -240,7 +241,7 @@ export const providers = [
description:
'e.g. thrift://127.0.0.1:9083 or jdbc:postgresql://127.0.0.1:5432/db_name or jdbc:mysql://127.0.0.1:3306/metastore_db',
parentField: 'catalog-backend',
- hide: 'filesystem'
+ hide: ['filesystem']
},
{
key: 'warehouse',
@@ -248,6 +249,20 @@ export const providers = [
required: true,
description: 'e.g. file:///user/hive/warehouse-paimon/ or hdfs://namespace/hdfs/path'
},
+ {
+ key: 'jdbc-user',
+ value: '',
+ required: true,
+ parentField: 'catalog-backend',
+ hide: ['hive', 'filesystem']
+ },
+ {
+ key: 'jdbc-password',
+ value: '',
+ required: true,
+ parentField: 'catalog-backend',
+ hide: ['hive', 'filesystem']
+ },
{
key: 'authentication.type',
value: 'simple',
@@ -263,7 +278,7 @@ export const providers = [
required: true,
description: 'The principal of the Kerberos authentication.',
parentField: 'authentication.type',
- hide: 'simple'
+ hide: ['simple']
},
{
key: 'authentication.kerberos.keytab-uri',
@@ -271,7 +286,7 @@ export const providers = [
required: true,
description: 'The URI of The keytab for the Kerberos authentication.',
parentField: 'authentication.type',
- hide: 'simple'
+ hide: ['simple']
}
]
},