devmadhuu commented on code in PR #4540:
URL: https://github.com/apache/ozone/pull/4540#discussion_r1188170765


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/BucketHandler.java:
##########
@@ -196,8 +197,12 @@ public static BucketHandler getBucketHandler(
       String volumeName, String bucketName) throws IOException {
 
     String bucketKey = omMetadataManager.getBucketKey(volumeName, bucketName);
-    OmBucketInfo bucketInfo = omMetadataManager
-        .getBucketTable().getSkipCache(bucketKey);
+    Table<String, OmBucketInfo> bucketTable =
+        omMetadataManager.getBucketTable();
+    OmBucketInfo bucketInfo = null;
+    if (null != bucketTable) {
+      bucketInfo = bucketTable.getSkipCache(bucketKey);
+    }
 
     return getBucketHandler(reconNamespaceSummaryManager,
         omMetadataManager, reconSCM, bucketInfo);

Review Comment:
   > We can move getBucketHandler call also inside if (null != bucketTable), so 
that no need to call getBucketHandler if bucketInfo is null.
   
   Thanks Ashish for review, however this is not needed as already below check 
is available in existing code of `getBucketHandler:`
   ![Uploading image.png…]()
   
   



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