Skip to content

Commit

Permalink
[apache#5185] feature(ui): support paimon JDBC and hive backend in WE…
Browse files Browse the repository at this point in the history
…B UI (apache#5195)

### What changes were proposed in this pull request?
support paimon JDBC and hive backend in WEB UI
<img width="568" alt="image"
src="https://github.com/user-attachments/assets/f0b116e7-4f86-457d-8a52-efa7b30e508d">
<img width="557" alt="image"
src="https://github.com/user-attachments/assets/a835dc5a-8a37-4abc-96a8-b917600876a1">
<img width="593" alt="image"
src="https://github.com/user-attachments/assets/a5539a7c-cc35-4598-9ac9-8f5cf35e0384">

### Why are the changes needed?
N/A

Fix: apache#5185

### Does this PR introduce _any_ user-facing change?
N/A

### How was this patch tested?
manually
  • Loading branch information
LauraXia123 authored Oct 22, 2024
1 parent 31b4e9d commit d75c201
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 (
Expand Down Expand Up @@ -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,
Expand Down
33 changes: 24 additions & 9 deletions web/web/src/lib/utils/initial.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,22 @@ 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`
},
{
key: 'jdbc-user',
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',
Expand All @@ -121,15 +121,15 @@ export const providers = [
required: true,
description: 'The principal of the Kerberos authentication.',
parentField: 'authentication.type',
hide: 'simple'
hide: ['simple']
},
{
key: 'authentication.kerberos.keytab-uri',
value: '',
required: true,
description: 'The URI of The keytab for the Kerberos authentication.',
parentField: 'authentication.type',
hide: 'simple'
hide: ['simple']
}
]
},
Expand Down Expand Up @@ -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',
Expand All @@ -240,14 +241,28 @@ 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',
value: '',
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',
Expand All @@ -263,15 +278,15 @@ export const providers = [
required: true,
description: 'The principal of the Kerberos authentication.',
parentField: 'authentication.type',
hide: 'simple'
hide: ['simple']
},
{
key: 'authentication.kerberos.keytab-uri',
value: '',
required: true,
description: 'The URI of The keytab for the Kerberos authentication.',
parentField: 'authentication.type',
hide: 'simple'
hide: ['simple']
}
]
},
Expand Down

0 comments on commit d75c201

Please sign in to comment.