[ https://issues.apache.org/jira/browse/HDFS-8345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14546117#comment-14546117 ]
Sean Busbey commented on HDFS-8345: ----------------------------------- {quote} 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. {quote} That's not so bad. Is there a reason not to include a convenience method that just takes a BlockStoragePolicySpi object directly? {quote} bq. Could we update the FileSystem specification documents? Which specification docs are you referring to? {quote} The one in the docs: http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/filesystem/index.html {quote} 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. {quote} Can you point me to the exposure? BlockStoragePolicy is IA.Private, and I would expect we can use covariant return types to make a source-compatible update. > 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)