[ https://issues.apache.org/jira/browse/HDFS-14195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16900337#comment-16900337 ]
Wei-Chiu Chuang edited comment on HDFS-14195 at 8/5/19 7:23 PM: ---------------------------------------------------------------- Thanks [~suxingfate] really appreciate your work! And thanks [~adam.antal] for helping with the review! Other than the checkstyle warnings, a few nits: {code} + " -sp print storage policy.\n" {code} We should also state this is used by delimited output only. Storage policy is always exported for XML output. We should also update the doc. Can be a separate jira. {code} BufferedReader reader = new BufferedReader(new FileReader(file)); {code} the reader is not closed properly. This'll result in leaked open file descriptors. {code} FSDataOutputStream o = hdfs.create(file); o.write(123); o.close(); {code} You should ideally use try .. with () to ensure resource is not leaked upon failure. It is less critical for test code, but nice to have. was (Author: jojochuang): Thanks [~suxingfate] really appreciate your work! Other than the checkstyle warnings, a few nits: {code} + " -sp print storage policy.\n" {code} We should also state this is used by delimited output only. Storage policy is always exported for XML output. We should also update the doc. Can be a separate jira. {code} BufferedReader reader = new BufferedReader(new FileReader(file)); {code} the reader is not closed properly. This'll result in leaked open file descriptors. {code} FSDataOutputStream o = hdfs.create(file); o.write(123); o.close(); {code} You should ideally use try .. with () to ensure resource is not leaked upon failure. It is less critical for test code, but nice to have. > OIV: print out storage policy id in oiv Delimited output > -------------------------------------------------------- > > Key: HDFS-14195 > URL: https://issues.apache.org/jira/browse/HDFS-14195 > Project: Hadoop HDFS > Issue Type: Improvement > Components: tools > Reporter: Wang, Xinglong > Assignee: Wang, Xinglong > Priority: Minor > Attachments: HDFS-14195.001.patch, HDFS-14195.002.patch, > HDFS-14195.003.patch, HDFS-14195.004.patch, HDFS-14195.005.patch, > HDFS-14195.006.patch, HDFS-14195.007.patch, HDFS-14195.008.patch > > > There is lacking of a method to get all folders and files with sort of > specified storage policy via command line, like ALL_SSD type. > By adding storage policy id to oiv output, it will help with oiv > post-analysis to have a overview of all folders/files with specified storage > policy and to apply internal regulation based on this information. > > Currently, for PBImageXmlWriter.java, in HDFS-9835 it added function to print > out xattr which including storage policy already. -- This message was sent by Atlassian JIRA (v7.6.14#76016) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org