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 2021/10/21 17:09:53 UTC

[GitHub] [ozone] aryangupta1998 commented on a change in pull request #2730: HDDS-5839. Make sure buckets created from OFS are in FILE_SYSTEM_OPTI…

aryangupta1998 commented on a change in pull request #2730:
URL: https://github.com/apache/ozone/pull/2730#discussion_r733885113



##########
File path: hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicRootedOzoneClientAdapterImpl.java
##########
@@ -222,6 +220,14 @@ private OzoneBucket getBucket(String volumeStr, String bucketStr,
     OzoneBucket bucket;
     try {
       bucket = proxy.getBucketDetails(volumeStr, bucketStr);
+      String bucketLayout = bucket.getBucketLayout().name();

Review comment:
       Same here, don't need to convert it to String.

##########
File path: hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneClientAdapterImpl.java
##########
@@ -153,6 +153,18 @@ public BasicOzoneClientAdapterImpl(String omHost, int omPort,
     objectStore = ozoneClient.getObjectStore();
     this.volume = objectStore.getVolume(volumeStr);
     this.bucket = volume.getBucket(bucketStr);
+
+    // Check if bucket layout is valid, OFS buckets cannot be in
+    // OBJECT_STORE layout
+    String bucketLayout = bucket.getBucketLayout().name();

Review comment:
       I don't think we need to convert bucketLayout to string, you can directly compare like
   `bucketLayout.equals(BucketLayout.OBJECT_STORE)` and you can directly print or concat with string like
   `" " + BucketLayout.FILE_SYSTEM_OPTIMIZED` without using name() function.




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