ChenSammi commented on code in PR #10781:
URL: https://github.com/apache/ozone/pull/10781#discussion_r4376015686


##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmBucketArgs.java:
##########
@@ -256,8 +268,20 @@ public Builder setBucketName(String bucket) {
       return this;
     }
 
+    /**
+     * Maps the legacy flag onto the versioning status: true enables
+     * versioning, false suspends it.
+     * @deprecated use {@link #setVersioningStatus(BucketVersioningStatus)}.
+     */
+    @Deprecated
     public Builder setIsVersionEnabled(Boolean versionFlag) {
-      this.isVersionEnabled = versionFlag;
+      this.versioningStatus = versionFlag == null ? null : versionFlag

Review Comment:
   This is one example bucket DB info.  It looks like default bucket 
isVersionEnabled is "false", which is better mapped to 
BucketVersioningStatus.UNVERSIONED instead of  
"BucketVersioningStatus.SUSPENDED", @symious what do you think? 
   
   ```
   { "/s3v/lance": {
     "metadata" : { },
     "objectID" : -9223372036854775552,
     "updateID" : 1,
     "volumeName" : "s3v",
     "bucketName" : "lance",
     "acls" : [ {
       "type" : "USER",
       "name" : "sammi",
       "aclScope" : "ACCESS"
     }, {
       "type" : "GROUP",
       "name" : "staff",
       "aclScope" : "ACCESS"
     } ],
     "isVersionEnabled" : false,
     "storageType" : "DISK",
     "creationTime" : 1792068900430,
     "modificationTime" : 1792068900430,
     "usedBytes" : 544269232,
     "usedNamespace" : 13,
     "quotaInBytes" : -1,
     "quotaInNamespace" : -1,
     "snapshotUsedBytes" : 0,
     "snapshotUsedNamespace" : 0,
     "bucketLayout" : "FILE_SYSTEM_OPTIMIZED",
     "owner" : "sammi",
     "tags" : { }
   }
    }
   ```
   



-- 
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]

Reply via email to