xichen01 commented on code in PR #4572:
URL: https://github.com/apache/ozone/pull/4572#discussion_r1172862666
##########
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:
I've tested removing only the copy (`new TreeMap<>(list);`) from the
constructor, and the result is that the memory consumption is basically the
same as the original
--
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]