Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement]: Using unified catalog for server external catalog. #2232

Merged
merged 28 commits into from
Nov 8, 2023

Conversation

baiyangtx
Copy link
Contributor

Why are the changes needed?

This is a subtask of #1061.

In this PR, the AMS will use UnifiedCatalog as ExternalCatalog implement.

Brief change log

  • Implement MixedIceberg FormatCatalog
  • Using UnifiedCatalog for ExternalCatalog implement in AMS

How was this patch tested?

  • Add some test cases that check the changes thoroughly including negative and positive cases if possible

  • Add screenshots for manual tests if appropriate

  • Run test locally before making a pull request

Documentation

  • Does this pull request introduce a new feature? ( no)

@github-actions github-actions bot added module:core Core module module:ams-server Ams server module module:mixed-hive Hive moduel for Mixed Format module:mixed-trino trino module for Mixed Format module:ams-dashboard Ams dashboard module labels Nov 1, 2023
@baiyangtx baiyangtx marked this pull request as ready for review November 1, 2023 12:14
Copy link

codecov bot commented Nov 1, 2023

Codecov Report

Attention: 70 lines in your changes are missing coverage. Please review.

Files Coverage Δ
...tic/server/catalog/InternalIcebergCatalogImpl.java 89.65% <100.00%> (ø)
...rctic/server/catalog/InternalMixedCatalogImpl.java 86.66% <100.00%> (-0.84%) ⬇️
...se/arctic/server/catalog/MixedHiveCatalogImpl.java 58.62% <100.00%> (+3.06%) ⬆️
...ctic/server/optimizing/plan/OptimizingPlanner.java 88.23% <100.00%> (ø)
.../java/com/netease/arctic/UnifiedCatalogLoader.java 54.54% <100.00%> (-3.79%) ⬇️
...java/com/netease/arctic/catalog/ArcticCatalog.java 50.00% <ø> (+50.00%) ⬆️
.../arctic/formats/iceberg/IcebergCatalogFactory.java 100.00% <100.00%> (+59.09%) ⬆️
...com/netease/arctic/formats/mixed/MixedCatalog.java 100.00% <100.00%> (ø)
.../arctic/formats/mixed/MixedHiveCatalogFactory.java 100.00% <100.00%> (ø)
...ctic/formats/mixed/MixedIcebergCatalogFactory.java 100.00% <100.00%> (ø)
... and 20 more

... and 9 files with indirect coverage changes

📢 Thoughts on this report? Let us know!

import java.util.Set;

public class CatalogBuilder {

// TODO: use internal or external concepts
/** matrix of catalog type and supported table formats */
private static final Map<String, Set<TableFormat>> formatSupportedMatrix =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What formats are supported by each catalog is quite important information. For example, CatalogController has similar information. Can you expose and share this information?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also think these two parts are somewhat repetitive.

BTW, for the variable name of "static final", it is better to use capital letters with underscores.

@shidayang
Copy link
Contributor

BTW, Your need test in local kerberos env

@shidayang
Copy link
Contributor

Need add UT for AmoroCatalog of mixed-format

@github-actions github-actions bot added the module:mixed-spark Spark module for Mixed Format label Nov 6, 2023
@github-actions github-actions bot added the module:mixed-flink Flink moduel for Mixed Format label Nov 7, 2023
Copy link
Contributor

@zhoujinsong zhoujinsong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

# Conflicts:
#	core/src/main/java/com/netease/arctic/utils/ArcticTableUtil.java
@baiyangtx baiyangtx merged commit 91ce56d into apache:master Nov 8, 2023
@baiyangtx baiyangtx deleted the external-unified-catalog branch November 8, 2023 08:07
ShawHee pushed a commit to ShawHee/arctic that referenced this pull request Dec 29, 2023
…ache#2232)

* Using unified catalog for server external catalog.

* fix hard code texts.

* spotless:apply

* add deprecated of ArcticCatalog initialize

* remove useless initialize

* remove useless code.

* remove catalog.refresh()

* spotless:apply

* fix unit tests.

* catalog impl to private

* build catalog to private

* remove IcebergCatalogWrapper.java

* spotless:apply

* remove useless comments.

* remove useless code.

* spotless:apply

* fix unit tests in core

* fix unit tests.

* apply spotless
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:ams-dashboard Ams dashboard module module:ams-server Ams server module module:core Core module module:mixed-flink Flink moduel for Mixed Format module:mixed-hive Hive moduel for Mixed Format module:mixed-spark Spark module for Mixed Format module:mixed-trino trino module for Mixed Format
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants