zhedoubushishi commented on a change in pull request #3416:
URL: https://github.com/apache/hudi/pull/3416#discussion_r751691310
##########
File path:
hudi-common/src/main/java/org/apache/hudi/common/config/DFSPropertiesConfiguration.java
##########
@@ -117,7 +159,43 @@ public void addProperties(BufferedReader reader) throws
IOException {
}
}
- public TypedProperties getConfig() {
- return props;
+ public static TypedProperties getGlobalProps() {
+ final TypedProperties globalProps = new TypedProperties();
+ globalProps.putAll(GLOBAL_PROPS);
+ return globalProps;
+ }
+
+ public TypedProperties getProps() {
+ return new TypedProperties(hoodieConfig.getProps());
+ }
+
+ public TypedProperties getProps(boolean includeGlobalProps) {
+ return new TypedProperties(hoodieConfig.getProps(includeGlobalProps));
+ }
+
+ private static Option<Path> getConfPathFromEnv() {
+ String confDir = System.getenv(CONF_FILE_DIR_ENV_NAME);
+ if (confDir == null) {
+ LOG.warn("Cannot find " + CONF_FILE_DIR_ENV_NAME + ", please set it as
the dir of " + DEFAULT_PROPERTIES_FILE);
+ return Option.empty();
Review comment:
Added a test called ```testNoGlobalConfFileConfigured``` to catch when
no external config file is configured.
--
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]