[ https://issues.apache.org/jira/browse/HDFS-8345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14545804#comment-14545804 ]
Arpit Agarwal commented on HDFS-8345: ------------------------------------- Thank you for the detailed review [~busbey]. bq. It would be nice if the returned values from getAllStoragePolicies were usable in a setStoragePolicy method. getAllStoragePolicies returns a collection, you can use BlockStoragePolicySpi#getName on a collection element as the parameter to setStoragePolicy. bq. Could we update the FileSystem specification documents? Which specification docs are you referring to? bq. Note that it's an optional operation and some implementations will throw UnsupportOperationException. Let's do that separately for all FileSystem API calls that fit the same pattern. bq. The method "getStoragePolicyNames" didn't make it into the patch. Update to point at new method? Fixed. bq. Should this return type be Collection<? extends BlockStoragePolicySpi> ? does the ordering matter? Maybe it should be a Set? Fixed to return a Collection. bq. Could we switch to calling the interface BlockStoragePolicy and make the one in HDFS "DFSBlockStoragePolicy" or the like? "Spi" is a term of art that's going to be less accessible for folks. bq. Should the various return types in BlockStoragePolicySpi be returning List or Set or SortedSet? I agree on both points. However it's likely incompatible since BlockStoragePolicy was exposed via a limited private interface in 2.6. bq. nit: this whitespace fix doesn't appear related to the rest of the changes in the file (but I'm not sure what Hadoop's norm is for 'related') Good catch, IntelliJ slipped that in. Fixed. > Storage policy APIs must be exposed via the FileSystem interface > ---------------------------------------------------------------- > > Key: HDFS-8345 > URL: https://issues.apache.org/jira/browse/HDFS-8345 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs-client > Affects Versions: 2.7.0 > Reporter: Arpit Agarwal > Assignee: Arpit Agarwal > Labels: BB2015-05-TBR > Attachments: HDFS-8345.01.patch, HDFS-8345.02.patch, > HDFS-8345.03.patch, HDFS-8345.04.patch, HDFS-8345.05.patch, HDFS-8345.06.patch > > > The storage policy APIs are not exposed via FileSystem. Since > DistributedFileSystem is tagged as LimitedPrivate we should expose the APIs > through FileSystem for use by other applications. -- This message was sent by Atlassian JIRA (v6.3.4#6332)