Source:
<code>public OmMultipartUploadList listMultipartUploads(String volumeName, String bucketName, String prefix) throws OMException { Preconditions.checkNotNull(volumeName); Preconditions.checkNotNull(bucketName); metadataManager.getLock().acquireLock(BUCKET_LOCK, volumeName, bucketName); try { List<String> multipartUploadKeys = metadataManager .getMultipartUploadKeys(volumeName, bucketName, prefix); List<OmMultipartUpload> collect = multipartUploadKeys.stream() .map(OmMultipartUpload::from) .map(upload -> { String dbKey = metadataManager .getOzoneKey(upload.getVolumeName(), upload.getBucketName(), upload.getKeyName()); try { Table<String, OmKeyInfo> openKeyTable = metadataManager.getOpenKeyTable(); OmKeyInfo omKeyInfo = openKeyTable.get(upload.getDbKey()); upload.setCreationTime( Instant.ofEpochMilli(omKeyInfo.getCreationTime())); } catch (IOException e) { LOG.warn( "Open key entry for multipart upload record can be read {}", dbKey); <START> } <END> return upload; }) .collect(Collectors.toList()); OmMultipartUploadList omMultipartUploadList = new OmMultipartUploadList(collect); return omMultipartUploadList; } catch (IOException ex) { LOG.error("List Multipart Uploads Failed: volume: " + volumeName + "bucket: " + bucketName + "prefix: " + prefix, ex); throw new OMException(ex.getMessage(), ResultCodes .LIST_MULTIPART_UPLOAD_PARTS_FAILED); } finally { metadataManager.getLock().releaseLock(BUCKET_LOCK, volumeName, bucketName); } }</code><technical_language>reading openKeyTable for creation time. If this information in omMultipartKeyInfo, avoid DB calls for openKeyTable. do this, set creationTime in OmMultipartKeyInfo initiateMultipartUpload . In this way, get required information MultipartKeyInfo table. StorageClass is missing returned OmMultipartUpload, listMultipartUploads shows StorageClass information. For this, if return replicationType depending this value, set StorageClass in listMultipartUploads Response</technical_language>

Target:
public OmMultipartUploadList listMultipartUploads(String volumeName, String bucketName, String prefix) throws OMException { Preconditions.checkNotNull(volumeName); Preconditions.checkNotNull(bucketName); metadataManager.getLock().acquireLock(BUCKET_LOCK, volumeName, bucketName); try { List<String> multipartUploadKeys = metadataManager .getMultipartUploadKeys(volumeName, bucketName, prefix); List<OmMultipartUpload> collect = multipartUploadKeys.stream() .map(OmMultipartUpload::from) .map(upload -> { String dbKey = metadataManager .getOzoneKey(upload.getVolumeName(), upload.getBucketName(), upload.getKeyName()); try { Table<String, OmKeyInfo> openKeyTable = metadataManager.getOpenKeyTable(); OmKeyInfo omKeyInfo = openKeyTable.get(upload.getDbKey()); upload.setCreationTime( Instant.ofEpochMilli(omKeyInfo.getCreationTime())); upload.setReplicationType(omKeyInfo.getType()); upload.setReplicationFactor(omKeyInfo.getFactor()); } catch (IOException e) { LOG.warn( "Open key entry for multipart upload record can be read {}", dbKey); } return upload; }) .collect(Collectors.toList()); return new OmMultipartUploadList(collect); } catch (IOException ex) { LOG.error("List Multipart Uploads Failed: volume: " + volumeName + "bucket: " + bucketName + "prefix: " + prefix, ex); throw new OMException(ex.getMessage(), ResultCodes .LIST_MULTIPART_UPLOAD_PARTS_FAILED); } finally { metadataManager.getLock().releaseLock(BUCKET_LOCK, volumeName, bucketName); } }