Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions hadoop-ozone/dist/src/main/smoketest/s3/MultipartUpload.robot
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ Test Multipart Upload With Adjusted Length
Perform Multipart Upload ${BUCKET} multipart/adjusted_length_${PREFIX} /tmp/part1 /tmp/part2
Verify Multipart Upload ${BUCKET} multipart/adjusted_length_${PREFIX} /tmp/part1 /tmp/part2

Overwrite Empty File
Execute touch ${TEMP_DIR}/empty
Execute AWSS3Cli cp ${TEMP_DIR}/empty s3://${BUCKET}/empty_file_${PREFIX}
Perform Multipart Upload ${BUCKET} empty_file_${PREFIX} /tmp/part1 /tmp/part2
Verify Multipart Upload ${BUCKET} empty_file_${PREFIX} /tmp/part1 /tmp/part2

Test Multipart Upload
${result} = Execute AWSS3APICli create-multipart-upload --bucket ${BUCKET} --key ${PREFIX}/multipartKey
${uploadID} = Execute and checkrc echo '${result}' | jq -r '.UploadId' 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.apache.hadoop.hdds.utils.db.BatchOperation;

import jakarta.annotation.Nonnull;
import jakarta.annotation.Nullable;

import static org.apache.hadoop.ozone.om.OmMetadataManagerImpl.BUCKET_TABLE;
import static org.apache.hadoop.ozone.om.OmMetadataManagerImpl.DELETED_TABLE;
Expand Down Expand Up @@ -130,6 +131,7 @@ protected OmKeyInfo getOmKeyInfo() {
return omKeyInfo;
}

@Nullable
protected OmBucketInfo getOmBucketInfo() {
return omBucketInfo;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,14 @@ public void addToDBBatch(OMMetadataManager omMetadataManager,
}

// namespace quota changes for parent directory
String bucketKey = omMetadataManager.getBucketKey(
getOmBucketInfo().getVolumeName(),
getOmBucketInfo().getBucketName());
omMetadataManager.getBucketTable().putWithBatch(batchOperation,
bucketKey, getOmBucketInfo());
OmBucketInfo omBucketInfo = getOmBucketInfo();
if (omBucketInfo != null) {
String bucketKey = omMetadataManager.getBucketKey(
omBucketInfo.getVolumeName(),
omBucketInfo.getBucketName());
omMetadataManager.getBucketTable().putWithBatch(batchOperation,
bucketKey, omBucketInfo);
}

if (OMFileRequest.getOmKeyInfoFromFileTable(true,
omMetadataManager, getMultiPartKey(), getOmKeyInfo().getKeyName())
Expand Down
Loading