You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by GitBox <gi...@apache.org> on 2019/10/18 05:49:55 UTC

[GitHub] [hadoop-ozone] bharatviswa504 commented on a change in pull request #50: HDDS-2131. Optimize replication type and creation time calculation in S3 MPU list call.

bharatviswa504 commented on a change in pull request #50: HDDS-2131. Optimize replication type and creation time calculation in S3 MPU list call.
URL: https://github.com/apache/hadoop-ozone/pull/50#discussion_r336328755
 
 

 ##########
 File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java
 ##########
 @@ -1323,29 +1323,36 @@ public OmMultipartUploadList listMultipartUploads(String volumeName,
 
       List<OmMultipartUpload> collect = multipartUploadKeys.stream()
           .map(OmMultipartUpload::from)
-          .map(upload -> {
+          .peek(upload -> {
             String dbKey = metadataManager
                 .getOzoneKey(upload.getVolumeName(),
                     upload.getBucketName(),
                     upload.getKeyName());
             try {
-              Table<String, OmKeyInfo> openKeyTable =
-                  metadataManager.getOpenKeyTable();
+              Table<String, OmMultipartKeyInfo> keyInfoTable =
+                  metadataManager.getMultipartInfoTable();
 
-              OmKeyInfo omKeyInfo =
-                  openKeyTable.get(upload.getDbKey());
+              OmMultipartKeyInfo multipartKeyInfo =
+                  keyInfoTable.get(upload.getDbKey());
 
               upload.setCreationTime(
-                  Instant.ofEpochMilli(omKeyInfo.getCreationTime()));
-
-              upload.setReplicationType(omKeyInfo.getType());
-              upload.setReplicationFactor(omKeyInfo.getFactor());
+                  Instant.ofEpochMilli(multipartKeyInfo.getCreationTime()));
+
+              TreeMap<Integer, PartKeyInfo> partKeyInfoMap =
+                  multipartKeyInfo.getPartKeyInfoMap();
+              if (!partKeyInfoMap.isEmpty()) {
+                PartKeyInfo partKeyInfo =
 
 Review comment:
   If there are no parts, if partKeyInfoMap.isEmpty()?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org