JyotinderSingh commented on a change in pull request #3077:
URL: https://github.com/apache/ozone/pull/3077#discussion_r805734265



##########
File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/bucket/OMBucketCreateRequest.java
##########
@@ -149,7 +149,9 @@ public OMClientResponse validateAndUpdateCache(OzoneManager 
ozoneManager,
     } else {
       omBucketInfo = OmBucketInfo.getFromProtobuf(bucketInfo);
     }
-
+    if (omBucketInfo.getBucketLayout().isFileSystemOptimized()) {
+      omMetrics.incNumFSOBucketCreates();
+    }

Review comment:
       Hey Ayush,
   ```java
   BucketLayout defaultType = BucketLayout.fromString(omDefaultBucketLayout);
   omBucketInfo = OmBucketInfo.getFromProtobuf(bucketInfo, defaultType);
   ```
   These lines inside the `if` condition will set the bucketLayout for 
omBucketInfo in case it is not present - so it will not be null. 
   The second argument in `OmBucketInfo.getFromProtobuf` call is the bucket 
layout being passed.




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