adoroszlai commented on code in PR #11740:
URL: https://github.com/apache/ozone/pull/11740#discussion_r4367652368
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java:
##########
@@ -1819,6 +1819,24 @@ public OzoneInputStream getKey(
return result;
}
+ @Override
+ public void deleteS3Key(String bucketName, String keyName, String
expectedETag) throws IOException {
+ if
(!OzoneManagerVersion.S3_VOLUME_CONTEXT_RESOLUTION.isSupportedBy(omVersion)) {
+ deleteKey(getS3VolumeContext().getOmVolumeArgs().getVolume(),
bucketName, keyName, false, expectedETag);
+ return;
+ }
+ verifyBucketName(bucketName);
+ Objects.requireNonNull(keyName, "keyName == null");
+ OmKeyArgs keyArgs = new OmKeyArgs.Builder()
+ .setVolumeName(OzoneConfigKeys.OZONE_S3_VOLUME_NAME_DEFAULT)
+ .setBucketName(bucketName)
+ .setKeyName(keyName)
+ .setExpectedETag(expectedETag)
+ .setAssumeS3Context(true)
+ .build();
+ ozoneManagerClient.deleteKey(keyArgs);
Review Comment:
Even if we continue expanding the interface with S3-specific methods, can we
avoid duplicating the implementation? Can simply decide on the volume name to
use based on OM version, and call existing `deleteKey`?
--
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]