linliu-code commented on code in PR #12888:
URL: https://github.com/apache/hudi/pull/12888#discussion_r1992058893
##########
hudi-common/src/main/java/org/apache/hudi/common/config/HoodieReaderConfig.java:
##########
@@ -89,4 +95,18 @@ public class HoodieReaderConfig extends HoodieConfig {
"hoodie.write.record.merge.custom.implementation.classes";
public static final String
RECORD_MERGE_IMPL_CLASSES_DEPRECATED_WRITE_CONFIG_KEY =
"hoodie.datasource.write.record.merger.impls";
+
+ public static boolean isFileGroupReaderEnabled(HoodieTableVersion
tableVersion, HoodieConfig config) {
+ return tableVersion.greaterThanOrEquals(HoodieTableVersion.EIGHT) &&
config.getBooleanOrDefault(HoodieReaderConfig.FILE_GROUP_READER_ENABLED);
+ }
+
+ public static boolean isFileGroupReaderEnabled(HoodieTableVersion
tableVersion, Map<String, String> parameters) {
+ return tableVersion.greaterThanOrEquals(HoodieTableVersion.EIGHT)
+ &&
Boolean.parseBoolean(parameters.getOrDefault(HoodieReaderConfig.FILE_GROUP_READER_ENABLED.key(),
HoodieReaderConfig.FILE_GROUP_READER_ENABLED.defaultValue().toString()));
+ }
+
+ public static boolean isFileGroupReaderEnabled(HoodieTableVersion
tableVersion, Configuration conf) {
+ return tableVersion.greaterThanOrEquals(HoodieTableVersion.EIGHT)
+ && conf.getBoolean(HoodieReaderConfig.FILE_GROUP_READER_ENABLED.key(),
HoodieReaderConfig.FILE_GROUP_READER_ENABLED.defaultValue());
+ }
Review Comment:
`Configuration conf` introduce hadoop dependencies into hudi-common. Should
we use StorageConfiguration instead?
--
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]