You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/02/14 06:03:04 UTC

[GitHub] [ozone] rakeshadr commented on a change in pull request #3077: HDDS-6305: Add metrics - number of FSO bucket creates

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



##########
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:
       @ayushtkn @JyotinderSingh 
   
   ```
    if (bucketInfo.getBucketLayout() == null)
          // sets to defaultValue. Here it can be OBS or FSO.
   
    } else {
         omBucketInfo = OmBucketInfo.getFromProtobuf(bucketInfo);
    }
   ```
   
   Since there is already an explicit `null` check [OMBucketCreateRequest.java#L142](https://github.com/apache/ozone/blob/master/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/bucket/OMBucketCreateRequest.java#L142) to safeguard NPE, I think it won't be null in any case and additional null check is not required, isn't it?
   
   




-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org