[ https://issues.apache.org/jira/browse/HDFS-8053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14908498#comment-14908498 ]
Haohui Mai commented on HDFS-8053: ---------------------------------- {code} + +public class HdfsConfigurationLoader { + + /** Load the default resources. + * + * This method is idempotent as the {@link Configuration#addDefaultResource} + * will only add the default resources once, in the order of their appearance. + */ + public static void load() { + // adds the default resources + Configuration.addDefaultResource("hdfs-default.xml"); + Configuration.addDefaultResource("hdfs-site.xml"); + } +} {code} (1) The class should be a package local class. (2) This is inefficient and cannot guard against calling load() for multiple times. Please follow the paradigms in {{HdfsConfiguration}}. > Move DFSIn/OutputStream and related classes to hadoop-hdfs-client > ----------------------------------------------------------------- > > Key: HDFS-8053 > URL: https://issues.apache.org/jira/browse/HDFS-8053 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: build > Reporter: Haohui Mai > Assignee: Mingliang Liu > Attachments: HDFS-8053.000.patch, HDFS-8053.001.patch, > HDFS-8053.002.patch, HDFS-8053.003.patch > > > This jira tracks the effort of moving the {{DFSInputStream}} and > {{DFSOutputSream}} classes from {{hadoop-hdfs}} to {{hadoop-hdfs-client}} > module. > Guidelines: > * As the {{DFSClient}} is heavily coupled to these two classes, we should > move it together. > * Related classes should be addressed in separate jiras if they're > independent and complex enough. > * The checkstyle warnings can be addressed in [HDFS-8979 | > https://issues.apache.org/jira/browse/HDFS-8979] > * Removing the _slf4j_ logger guards when calling {{LOG.debug()}} and > {{LOG.trace()}} can be addressed in [HDFS-8971 | > https://issues.apache.org/jira/browse/HDFS-8971]. -- This message was sent by Atlassian JIRA (v6.3.4#6332)