-
Notifications
You must be signed in to change notification settings - Fork 400
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
Conversation
aecdd3a
to
03c0d52
Compare
fixed ci error : #6305 |
03c0d52
to
97bc2a7
Compare
@FANNG1 PTAL , thanks |
...ink/src/main/java/org/apache/gravitino/flink/connector/paimon/PaimonPropertiesConverter.java
Outdated
Show resolved
Hide resolved
...-connector/flink/src/main/java/org/apache/gravitino/flink/connector/PropertiesConverter.java
Outdated
Show resolved
Hide resolved
f576a21
to
92d0edb
Compare
@FANNG1 Fixed all , PTAL again, thanks |
...-connector/flink/src/main/java/org/apache/gravitino/flink/connector/PropertiesConverter.java
Outdated
Show resolved
Hide resolved
...-connector/flink/src/main/java/org/apache/gravitino/flink/connector/PropertiesConverter.java
Show resolved
Hide resolved
...c/test/java/org/apache/gravitino/flink/connector/iceberg/TestIcebergPropertiesConverter.java
Show resolved
Hide resolved
dbeb10b
to
364591c
Compare
...c/test/java/org/apache/gravitino/flink/connector/iceberg/TestIcebergPropertiesConverter.java
Show resolved
Hide resolved
...c/test/java/org/apache/gravitino/flink/connector/iceberg/TestIcebergPropertiesConverter.java
Show resolved
Hide resolved
LGTM except minor comments |
...-connector/flink/src/main/java/org/apache/gravitino/flink/connector/PropertiesConverter.java
Show resolved
Hide resolved
}); | ||
return flinkCatalogProperties; | ||
public String transformPropertyToFlinkCatalog(String configKey) { | ||
return GRAVITINO_CONFIG_TO_HIVE.getOrDefault(configKey, configKey); |
There was a problem hiding this comment.
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)
?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
...k/src/main/java/org/apache/gravitino/flink/connector/iceberg/IcebergPropertiesConverter.java
Show resolved
Hide resolved
@@ -35,7 +35,7 @@ public void testToGravitinoCatalogProperties() { | |||
Configuration configuration = | |||
Configuration.fromMap( | |||
ImmutableMap.of( | |||
"hive-conf-dir", |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert
3747563
to
fc250a6
Compare
fc250a6
to
6fb45d6
Compare
266fda7
to
8c82109
Compare
8c82109
to
e01414b
Compare
LGTM |
@sunxiaojian thanks for your work to make code cleaner. |
…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
What changes were proposed in this pull request?
Why are the changes needed?
Fix: #(6302)
Does this PR introduce any user-facing change?
N/A
How was this patch tested?
N/A