xichen01 commented on code in PR #4572:
URL: https://github.com/apache/ozone/pull/4572#discussion_r1172825797


##########
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:
   But here it will also copy `TreeMap`
   
https://github.com/apache/ozone/blob/52db80f920dcb11eb231e1cc98c909f3b0638b25/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmMultipartKeyInfo.java#L257-L264
    when `get` form RocksDB
   
https://github.com/apache/ozone/blob/cffa3864b974499078fbdb37506ed992319b09c5/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/multipart/S3MultipartUploadCommitPartRequest.java#L149-L150
   



-- 
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]

Reply via email to