Attila Doroszlai created HDDS-14231:
---------------------------------------
Summary: Reduce copying in OMFileRequest.getOmKeyInfo
Key: HDDS-14231
URL: https://issues.apache.org/jira/browse/HDDS-14231
Project: Apache Ozone
Issue Type: Sub-task
Components: Ozone Manager
Reporter: Attila Doroszlai
Assignee: Chia-Chuan Ho
Similar to HDDS-14172, in the reverse direction: {{OMFileRequest.getOmKeyInfo}}
creates {{OmKeyInfo}} from {{OmDirectoryInfo}} using {{newBuilder}}.
- Add {{private OmKeyInfo.Builder(OmDirectoryInfo)}}, which should
-- call {{super(dirInfo)}} to set inherited properties
-- assign {{acls = AclListBuilder.of(dirInfo.getAcls())}}
-- {{setKeyName(dirInfo.getName())}}
-- move setting replication config and key location from
{{OMFileRequest.getOmKeyInfo}}
-- set creation/modification time as is
- Add {{public OmKeyInfo.Builder toKeyInfoBuilder()}}
- Change {{OMFileRequest.getOmKeyInfo}} to use {{return
dirInfo.toKeyInfoBuilder()}}, removing unnecessary {{set...}} calls
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]