ivandika3 commented on code in PR #8953:
URL: https://github.com/apache/ozone/pull/8953#discussion_r2306782427
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/lifecycle/OMLifecycleConfigurationSetRequest.java:
##########
@@ -100,7 +99,7 @@ public OMRequest preExecute(OzoneManager ozoneManager)
throws IOException {
.setVolume(resolvedBucket.realVolume())
.setBucket(resolvedBucket.realBucket());
- newLifecycleConfiguration.setCreationTime(Time.now());
+ newLifecycleConfiguration.setCreationTime(System.currentTimeMillis());
Review Comment:
Nit: This is equivalent? In that case, there is no need to change I think.
##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/BucketEndpoint.java:
##########
@@ -813,7 +813,9 @@ public Response putBucketLifecycleConfiguration(
if (ex.getResult() == ResultCodes.ACCESS_DENIED) {
throw S3ErrorTable.newError(S3ErrorTable.ACCESS_DENIED, bucketName);
} else if (ex.getResult() == ResultCodes.INVALID_REQUEST) {
- throw S3ErrorTable.newError(S3ErrorTable.INVALID_REQUEST, bucketName);
+ OS3Exception invalidException = S3ErrorTable.INVALID_REQUEST;
+ invalidException.setErrorMessage(ex.getMessage());
+ throw S3ErrorTable.newError(invalidException, bucketName);
Review Comment:
Nit: Add `setResource(bucketName)`
##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/S3LifecycleConfiguration.java:
##########
@@ -257,13 +257,14 @@ public OmLifecycleConfiguration
toOmLifecycleConfiguration(OzoneBucket ozoneBuck
OmLifecycleConfiguration.Builder builder = new
OmLifecycleConfiguration.Builder()
.setVolume(ozoneBucket.getVolumeName())
.setBucketLayout(ozoneBucket.getBucketLayout())
+ .setCreationTime(System.currentTimeMillis())
Review Comment:
Can I check which creation time is used? This one or the one in
`OMLifecycleConfigurationSetRequest`?
--
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]