[
https://issues.apache.org/jira/browse/HDFS-11298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15871497#comment-15871497
]
Surendra Singh Lilhore commented on HDFS-11298:
-----------------------------------------------
Thanks [~linyiqun] for review...
bq. "Interface that represents the client side information for a file.", the
client need to know the storage policy info of one file?
Storage policy is set by the client only, so we can return it in {{FileStatus}}
object. Currently client need to do one extra RPC call ({{getStoragePolicy()}})
to get the storage policy ID
bq. Currently the field infos in FileStatus are all base info like blocksize,
modification_time etc. And some other info like storage policy info is defined
in HdfsFileStatus.
InterfaceAudience for {{HdfsFileStatus}} is private, so other application not
use this class. Anyway {{DistributedFileSystem.getFileStatus()}} return only
{{FileStatus}} object.
bq. Here the default policy id is not (byte) 0, it should be byte
7(HdfsConstants.HOT_STORAGE_POLICY_ID). You may use this var to replace with
bytes 0.
"0" mean BLOCK_STORAGE_POLICY_ID_UNSPECIFIED. In existing constructor we can
give "0" because client doesn't the policy for the file.
> Add storage policy info in FileStatus
> -------------------------------------
>
> Key: HDFS-11298
> URL: https://issues.apache.org/jira/browse/HDFS-11298
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs-client
> Affects Versions: 2.7.2
> Reporter: Surendra Singh Lilhore
> Assignee: Surendra Singh Lilhore
> Attachments: HDFS-11298.001.patch
>
>
> Its good to add storagePolicy field in FileStatus. We no need to call
> getStoragePolicy() API to get the policy.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]