szetszwo commented on code in PR #4572:
URL: https://github.com/apache/ozone/pull/4572#discussion_r1172775648
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmMultipartKeyInfo.java:
##########
@@ -58,18 +60,19 @@ public class OmMultipartKeyInfo extends WithObjectID {
* ------------------------------------------|
*/
private long parentID;
+ public static final PartKeyInfo EMPTY_PART_KEY_INFO = null;
/**
* Construct OmMultipartKeyInfo object which holds multipart upload
* information for a key.
*/
public OmMultipartKeyInfo(String id, long creationTime,
ReplicationConfig replicationConfig,
- Map<Integer, PartKeyInfo> list, long objectID, long updateID) {
+ IntSparseMap<PartKeyInfo> list, long objectID, long updateID) {
this.uploadID = id;
this.creationTime = creationTime;
this.replicationConfig = replicationConfig;
- this.partKeyInfoList = new TreeMap<>(list);
+ this.partKeyInfoList = list;
Review Comment:
> In the change here, you have avoided copying a TreeMap in a
OmMultipartKeyInfo constructor. ...
@xichen01 , I mean this line.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]