nsivabalan commented on a change in pull request #4003:
URL: https://github.com/apache/hudi/pull/4003#discussion_r749874318
##########
File path:
hudi-common/src/main/java/org/apache/hudi/common/config/HoodieMetadataConfig.java
##########
@@ -233,10 +237,28 @@ public Builder enableFullScan(boolean enableFullScan) {
return this;
}
+ public Builder withEngineType(EngineType engineType) {
+ this.engineType = engineType;
+ return this;
+ }
+
public HoodieMetadataConfig build() {
+ metadataConfig.setDefaultValue(ENABLE,
getDefaultMetadataEnable(engineType));
metadataConfig.setDefaults(HoodieMetadataConfig.class.getName());
return metadataConfig;
}
+
+ private boolean getDefaultMetadataEnable(EngineType engineType) {
+ switch (engineType) {
+ case SPARK:
+ return ENABLE.defaultValue();
+ case FLINK:
Review comment:
flink already has a [separate
config](https://github.com/apache/hudi/blob/38b6934352abd27b98332cce005f18102b388679/hudi-flink/src/main/java/org/apache/hudi/configuration/FlinkOptions.java#L94)
for metadata. So, by the time it reaches here, config will be set incase of
filnk engine.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]