chihsuan commented on code in PR #12170:
URL: https://github.com/apache/ozone/pull/12170#discussion_r4786129111
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/protocol/ClientProtocol.java:
##########
@@ -161,9 +162,9 @@ OzoneVolume getVolumeDetails(String volumeName)
* If Key exists, return returns OzoneKey.
* If Key does not exist, throws an exception with error code KEY_NOT_FOUND
*
- * @return OzoneKey which gives basic information about the key.
+ * @return OzoneKey which gives basic information about the key, with its
lifecycle expiration.
*/
- OzoneKey headS3Object(String bucketName, String keyName) throws IOException;
+ S3KeyReadResult<OzoneKey> headS3Object(String bucketName, String keyName)
throws IOException;
Review Comment:
+1, thanks for catching this! Sorry, my earlier suggestion wasn't clear. I
meant new methods returning `S3KeyReadResult`, like how
`headS3ObjectAttributes` was added, keeping the existing ones unchanged.
##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java:
##########
@@ -491,6 +495,7 @@ Response handleGetRequest(ObjectRequestContext context,
String keyPath)
}
addLastModifiedDate(responseBuilder, keyDetails);
+ addExpirationIfAny(responseBuilder, readResult);
Review Comment:
`S3Utils.s3urlEncode` might help here, since it already encodes a space as
`%20`. It could also replace the manual escaping and the control character
check.
--
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]