[ https://issues.apache.org/jira/browse/HADOOP-17001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17088030#comment-17088030 ]
Mingliang Liu commented on HADOOP-17001: ---------------------------------------- A final class with private constructor may be better for the purpose of Constants. An interface can be implemented and usually serves as contract of a group of related methods. nit: we can replace {code} /** * Default extension for {@link * org.apache.hadoop.io.compress.PassthroughCodec}. */ {code} with {code} /** * Default extension for * {@link org.apache.hadoop.io.compress.PassthroughCodec}. */ {code} nit: and also replace {code} /** * Default extension for {@link * org.apache.hadoop.io.compress.ZStandardCodec}. */ {code} with {code} /** * Default extension for {@link org.apache.hadoop.io.compress.ZStandardCodec}. */ {code} since it's not over 80 chars. The patch file naming convention is https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute#HowToContribute-Namingyourpatch After uploading a patch, you can click "Submit Patch" to trigger the QA run. Also if you like Github, you can file PR directly there with the JIRA number in PR subject. Thanks, > The suffix name of the unified compression class > ------------------------------------------------ > > Key: HADOOP-17001 > URL: https://issues.apache.org/jira/browse/HADOOP-17001 > Project: Hadoop Common > Issue Type: Improvement > Components: io > Affects Versions: 3.2.1 > Reporter: bianqi > Assignee: bianqi > Priority: Major > Attachments: HADOOP-17001-001.patch, HADOOP-17001-002.patch > > > The suffix name of the unified compression class,I think the suffix name in > the compression class should be extracted into a constant class, which is > helpful for developers to understand the structure of the compression class > as a whole. > {quote}public static final String OPT_EXTENSION = > "io.compress.passthrough.extension"; > /** > * This default extension is here so that if no extension has been defined, > * some value is still returned: \{@value}.. > */ > public static final String DEFAULT_EXTENSION = ".passthrough"; > private Configuration conf; > private String extension = DEFAULT_EXTENSION; > public PassthroughCodec() { > } > {quote} > The above code, the use of constants is a bit messy. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org