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

[#6302] refactor:Optimize Flink connector properties converter #6303

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

sunxiaojian
Copy link
Contributor

What changes were proposed in this pull request?

  • Unified params format, add flink.bypass. prefix, especially Iceberg.
  • Extract the flink.bypass. logic to the PropertiesConverter, and the extension logic does not care about this operation

Why are the changes needed?

Fix: #(6302)

Does this PR introduce any user-facing change?

N/A

How was this patch tested?

N/A

@sunxiaojian sunxiaojian force-pushed the extract-flink-converter-logic branch from aecdd3a to 03c0d52 Compare January 16, 2025 16:14
@sunxiaojian
Copy link
Contributor Author

sunxiaojian commented Jan 16, 2025

fixed ci error : #6305

@sunxiaojian sunxiaojian force-pushed the extract-flink-converter-logic branch from 03c0d52 to 97bc2a7 Compare January 17, 2025 02:27
@sunxiaojian
Copy link
Contributor Author

@FANNG1 PTAL , thanks

@sunxiaojian sunxiaojian force-pushed the extract-flink-converter-logic branch 3 times, most recently from f576a21 to 92d0edb Compare January 21, 2025 02:48
@sunxiaojian
Copy link
Contributor Author

@FANNG1 Fixed all , PTAL again, thanks

@sunxiaojian sunxiaojian force-pushed the extract-flink-converter-logic branch 2 times, most recently from dbeb10b to 364591c Compare January 22, 2025 02:17
@FANNG1
Copy link
Contributor

FANNG1 commented Jan 22, 2025

LGTM except minor comments

});
return flinkCatalogProperties;
public String transformPropertyToFlinkCatalog(String configKey) {
return GRAVITINO_CONFIG_TO_HIVE.getOrDefault(configKey, configKey);
Copy link
Contributor

Choose a reason for hiding this comment

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

How about using GRAVITINO_CONFIG_TO_HIVE.get(configKey)?

Copy link
Contributor

Choose a reason for hiding this comment

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

transformPropertyToFlinkCatalog return null if the config key not in the map, WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@@ -35,7 +35,7 @@ public void testToGravitinoCatalogProperties() {
Configuration configuration =
Configuration.fromMap(
ImmutableMap.of(
"hive-conf-dir",
Copy link
Contributor

Choose a reason for hiding this comment

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

better to pass hive-conf-dir not flink.bypass.hive-conf-dir when creating a hive catalog from Flink SQL

Copy link
Contributor Author

Choose a reason for hiding this comment

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

revert

@sunxiaojian sunxiaojian force-pushed the extract-flink-converter-logic branch from 3747563 to fc250a6 Compare January 23, 2025 14:02
@sunxiaojian sunxiaojian force-pushed the extract-flink-converter-logic branch from fc250a6 to 6fb45d6 Compare January 23, 2025 14:08
@sunxiaojian sunxiaojian reopened this Jan 23, 2025
@sunxiaojian sunxiaojian force-pushed the extract-flink-converter-logic branch 4 times, most recently from 266fda7 to 8c82109 Compare January 23, 2025 14:56
@sunxiaojian sunxiaojian force-pushed the extract-flink-converter-logic branch from 8c82109 to e01414b Compare January 23, 2025 15:12
@FANNG1
Copy link
Contributor

FANNG1 commented Jan 23, 2025

LGTM

@FANNG1 FANNG1 merged commit 792ded1 into apache:main Jan 24, 2025
28 checks passed
@FANNG1
Copy link
Contributor

FANNG1 commented Jan 24, 2025

@sunxiaojian thanks for your work to make code cleaner.

Abyss-lord pushed a commit to Abyss-lord/gravitino that referenced this pull request Feb 6, 2025
…pache#6303)

### What changes were proposed in this pull request?

- Unified params format, add flink.bypass. prefix, especially Iceberg.
- Extract the flink.bypass. logic to the PropertiesConverter, and the
extension logic does not care about this operation

### Why are the changes needed?

Fix: [#(6302)](apache#6302)

### Does this PR introduce _any_ user-facing change?

N/A

### How was this patch tested?

N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Improvement] Optimize Flink connector properties converter
2 participants