adoroszlai commented on code in PR #8475: URL: https://github.com/apache/ozone/pull/8475#discussion_r2101752010
########## hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/conf/OzoneConfiguration.java: ########## @@ -105,42 +104,10 @@ public static <T> T newInstanceOf(Class<T> configurationClass) { } public OzoneConfiguration() { - OzoneConfiguration.activate(); - loadDefaults(); } public OzoneConfiguration(Configuration conf) { super(conf); - //load the configuration from the classloader of the original conf. - setClassLoader(conf.getClassLoader()); - if (!(conf instanceof OzoneConfiguration)) { - loadDefaults(); - addResource(conf); - } - } - - private void loadDefaults() { - try { - //there could be multiple ozone-default-generated.xml files on the - // classpath, which are generated by the annotation processor. - // Here we add all of them to the list of the available configuration. - Enumeration<URL> generatedDefaults = - OzoneConfiguration.class.getClassLoader().getResources( - "ozone-default-generated.xml"); - while (generatedDefaults.hasMoreElements()) { - addResource(generatedDefaults.nextElement()); - } - } catch (IOException e) { - e.printStackTrace(); - } - addResource("ozone-default.xml"); - // Adding core-site here because properties from core-site are - // distributed to executors by spark driver. Ozone properties which are - // added to core-site, will be overridden by properties from adding Resource - // ozone-default.xml. So, adding core-site again will help to resolve - // this override issue. Review Comment: @umamaheswararao Please see the "Remove the hack introduced by HDDS-3871" point in PR description. -- 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: issues-unsubscr...@ozone.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org For additional commands, e-mail: issues-h...@ozone.apache.org