Skip to content

Commit

Permalink
[AMORO-2861]: Support display Hudi table metadata in Amoro Dashboard (a…
Browse files Browse the repository at this point in the history
…pache#2877)

* Hudi | Add format catalog and hadoop implements.

* Refactor | Move hive related common class to core module.

* Show Hudi tables in dashboard

* show right table column field types.

* show right table properties

* partition keys && primary keys

* hoodie table files

* snapshot summary

* snapshot details

* optimizing infos

* optimizing task infos

* spotless apply

* fix checkstyle

* use amoro shade

* fix complie problems

* remove useless codes

* support cluster instant

* fix unit test problems

* set hudi to provided

* fix spark unit test problems.

* fix checkstyle

* fix reviews

* fix conflict

* fix checkstyle

* dependency change

* revert mock hive

* no hudi format catalog in spark ut

* revert optimizer config

* test-jar

* remove optimizer config

* fix compile problem

* add test-jar goal for jar-plugin

* fix method

---------

Co-authored-by: ZhouJinsong <[email protected]>
  • Loading branch information
baiyangtx and zhoujinsong authored Aug 19, 2024
1 parent 9b05fbf commit aa0f91f
Show file tree
Hide file tree
Showing 37 changed files with 2,093 additions and 64 deletions.
37 changes: 37 additions & 0 deletions amoro-ams/amoro-ams-dashboard/src/assets/icons/svg/hudi.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions amoro-ams/amoro-ams-dashboard/src/types/common.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ export enum tableTypeIconMap {
ARCTIC = 'amoro',
HIVE = 'hive',
PAIMON = 'paimon',
HUDI = 'hudi',
}

export type ILineChartOriginalData = Record<string, Record<string, number>>
Expand Down
5 changes: 4 additions & 1 deletion amoro-ams/amoro-ams-dashboard/src/views/catalogs/Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,20 @@ const tableFormatMap = {
ICEBERG: 'ICEBERG',
MIXED_ICEBERG: 'MIXED_ICEBERG',
PAIMON: 'PAIMON',
HUDI: 'HUDI',
}

const tableFormatText = {
[tableFormatMap.ICEBERG]: 'Iceberg',
[tableFormatMap.MIXED_HIVE]: 'Mixed Hive',
[tableFormatMap.MIXED_ICEBERG]: 'Mixed Iceberg',
[tableFormatMap.PAIMON]: 'Paimon',
[tableFormatMap.HUDI]: 'Hudi',
}
const storeSupportFormat: { [prop: string]: string[] } = {
ams: [tableFormatMap.MIXED_ICEBERG, tableFormatMap.ICEBERG],
hive: [tableFormatMap.MIXED_HIVE, tableFormatMap.MIXED_ICEBERG, tableFormatMap.ICEBERG, tableFormatMap.PAIMON],
hive: [tableFormatMap.MIXED_HIVE, tableFormatMap.MIXED_ICEBERG,
tableFormatMap.ICEBERG, tableFormatMap.PAIMON, tableFormatMap.HUDI],
hadoop: [tableFormatMap.MIXED_ICEBERG, tableFormatMap.ICEBERG, tableFormatMap.PAIMON],
glue: [tableFormatMap.MIXED_ICEBERG, tableFormatMap.ICEBERG],
custom: [tableFormatMap.MIXED_ICEBERG, tableFormatMap.ICEBERG],
Expand Down
22 changes: 22 additions & 0 deletions amoro-ams/amoro-ams-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@
<artifactId>derby</artifactId>
</dependency>

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
Expand Down Expand Up @@ -292,6 +298,22 @@
</exclusions>
</dependency>

<!-- apache hudi dependencies -->
<dependency>
<groupId>org.apache.hudi</groupId>
<artifactId>hudi-java-client</artifactId>
<exclusions>
<exclusion>
<groupId>org.apache.orc</groupId>
<artifactId>orc-core</artifactId>
</exclusion>
<exclusion>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- runtime dependencies -->
<dependency>
<groupId>org.apache.amoro</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,20 @@ public class CatalogBuilder {
private static final Map<String, Set<TableFormat>> formatSupportedMatrix =
ImmutableMap.of(
CATALOG_TYPE_HADOOP,
Sets.newHashSet(TableFormat.ICEBERG, TableFormat.MIXED_ICEBERG, TableFormat.PAIMON),
Sets.newHashSet(
TableFormat.ICEBERG,
TableFormat.MIXED_ICEBERG,
TableFormat.PAIMON,
TableFormat.HUDI),
CATALOG_TYPE_GLUE, Sets.newHashSet(TableFormat.ICEBERG, TableFormat.MIXED_ICEBERG),
CATALOG_TYPE_CUSTOM, Sets.newHashSet(TableFormat.ICEBERG, TableFormat.MIXED_ICEBERG),
CATALOG_TYPE_HIVE,
Sets.newHashSet(
TableFormat.ICEBERG,
TableFormat.MIXED_ICEBERG,
TableFormat.MIXED_HIVE,
TableFormat.PAIMON),
TableFormat.PAIMON,
TableFormat.HUDI),
CATALOG_TYPE_AMS, Sets.newHashSet(TableFormat.ICEBERG, TableFormat.MIXED_ICEBERG));

private static String getAmsURI(Configurations serviceConfig) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ List<AmoroSnapshotsOfTable> getSnapshots(
AmoroTable<?> amoroTable, String ref, OperationType operationType);

/** Get the snapshot detail information of the {@link AmoroTable}. */
List<PartitionFileBaseInfo> getSnapshotDetail(AmoroTable<?> amoroTable, long snapshotId);
List<PartitionFileBaseInfo> getSnapshotDetail(AmoroTable<?> amoroTable, String snapshotId);

/** Get the DDL information of the {@link AmoroTable}. */
List<DDLInfo> getTableOperations(AmoroTable<?> amoroTable);
Expand All @@ -65,7 +65,7 @@ Pair<List<OptimizingProcessInfo>, Integer> getOptimizingProcessesInfo(
AmoroTable<?> amoroTable, int limit, int offset);

/** Get the paged optimizing process tasks information of the {@link AmoroTable}. */
List<OptimizingTaskInfo> getOptimizingTaskInfos(AmoroTable<?> amoroTable, long processId);
List<OptimizingTaskInfo> getOptimizingTaskInfos(AmoroTable<?> amoroTable, String processId);

/** Get the tag information of the {@link AmoroTable}. */
List<TagOrBranchInfo> getTableTags(AmoroTable<?> amoroTable);
Expand Down
Loading

0 comments on commit aa0f91f

Please sign in to comment.