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/11/13 14:19:08 UTC

[GitHub] [ozone] rakeshadr commented on a change in pull request #2837: HDDS-5959. Handles bucket layout validation logic in ofs/o3fs client.

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



##########
File path: hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneClientAdapterImpl.java
##########
@@ -153,6 +153,17 @@ 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
+    BucketLayout bucketLayout = bucket.getBucketLayout();
+    if (bucketLayout.equals(BucketLayout.OBJECT_STORE)) {
+      throw new IllegalArgumentException(bucketLayout + " does not support" +

Review comment:
       @JyotinderSingh Please modify the message with bucket name, something like:
   
     ```
       throw new IllegalArgumentException("Bucket: " + bucket.getName() +" is with layout: " + bucketLayout + ", which does not support" +
             " file system semantics. Bucket Layout must be " +
             BucketLayout.FILE_SYSTEM_OPTIMIZED + " or "
             + BucketLayout.LEGACY + ".");
   ```




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