[
https://issues.apache.org/jira/browse/HDFS-8815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14659521#comment-14659521
]
Vinayakumar B commented on HDFS-8815:
-------------------------------------
bq. It is good to avoid required for new protobuf messages even though we have
used it in the past. required fields make it hard to evolve the protocol in a
compatible way. You could consider setting the fields to optional if you'd like
and add an explicit check to make sure they are present. But I'd be okay with
committing it as it is.
Isn't it for only new fields in a already existing protobuf message?
Or you mean to say optional fields allow us to change in future for better
implementations?
bq. But I'd be okay with committing it as it is.
I am going ahead to commit this for now. Since current RPC involves only one
field for both request and response, I think {{required}} is fine.
> DFS getStoragePolicy implementation using single RPC call
> ---------------------------------------------------------
>
> Key: HDFS-8815
> URL: https://issues.apache.org/jira/browse/HDFS-8815
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: hdfs-client
> Affects Versions: 2.8.0
> Reporter: Arpit Agarwal
> Assignee: Surendra Singh Lilhore
> Attachments: HDFS-8815-001.patch, HDFS-8815-002.patch,
> HDFS-8815-003.patch, HDFS-8815-004.patch
>
>
> HADOOP-12161 introduced a new {{FileSystem#getStoragePolicy}} call. The DFS
> implementation of the call requires two RPC calls, the first to fetch the
> storage policy ID and the second to fetch the policy suite to map the policy
> ID to a {{BlockStoragePolicySpi}}.
> Fix the implementation to require a single RPC call.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)