sarvekshayr commented on code in PR #11232:
URL: https://github.com/apache/ozone/pull/11232#discussion_r4014719429


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/shell/TestOzoneShellHA.java:
##########
@@ -1278,6 +1279,93 @@ public void testDeleteTrashNoSkipTrash() throws 
Exception {
 
   }
 
+  @Test
+  @SuppressWarnings("methodlength")

Review Comment:
   Avoid `@SuppressWarnings` in new code. Also applies to test method 
`testShUpdateBucketStoragePolicy`.



##########
hadoop-ozone/cli-shell/src/main/java/org/apache/hadoop/ozone/shell/bucket/CreateBucketHandler.java:
##########
@@ -67,6 +69,19 @@ public class CreateBucketHandler extends BucketHandler {
   @CommandLine.Mixin
   private SetSpaceQuotaOptions quotaOptions;
 
+  @Option(names = {"--storage-policy", "-s"},
+      description = "Bucket StoragePolicy. Allowed values: HOT, WARM, COLD, 
null. Default: WARM.",
+      defaultValue = "WARM")

Review Comment:
   Use the `showDefaultValue` attribute instead of adding default in 
description.
   ```suggestion
         description = "Bucket StoragePolicy. Allowed values: HOT, WARM, COLD, 
null.",
         defaultValue = "WARM",
         showDefaultValue = CommandLine.Help.Visibility.ALWAYS)
   ```



##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/OzoneConsts.java:
##########
@@ -300,6 +300,7 @@ public final class OzoneConsts {
   public static final String STORAGE_TYPE = "storageType";
   public static final String STORAGE_POLICY = "storagePolicy";
   public static final String ALLOW_FALLBACK_STORAGE_POLICY = 
"allowFallbackStoragePolicy";
+  public static final String UNSET_STORAGE_POLICY = "unSetStoragePolicy";

Review Comment:
   nit: Let’s use `unset` as it reads better than `unSet.`



##########
hadoop-ozone/cli-shell/src/main/java/org/apache/hadoop/ozone/shell/bucket/CreateBucketHandler.java:
##########
@@ -67,6 +69,19 @@ public class CreateBucketHandler extends BucketHandler {
   @CommandLine.Mixin
   private SetSpaceQuotaOptions quotaOptions;
 
+  @Option(names = {"--storage-policy", "-s"},
+      description = "Bucket StoragePolicy. Allowed values: HOT, WARM, COLD, 
null. Default: WARM.",
+      defaultValue = "WARM")
+  private String storagePolicyStr;
+
+  @Option(names = {"--allow-fallback-storage-policy", "-a"},
+      description = "When true, allocation may fall back to the 
StoragePolicy's " +
+          "fallback tier if the creation tier is unavailable. Default: true.",
+      defaultValue = "true")
+  private String allowFallBackStoragePolicyStr;

Review Comment:
   Can we use `boolean` instead of `String` for `allowFallBackStoragePolicy` 
field?
   ```suggestion
     private boolean allowFallBackStoragePolicy;
   ```
   
   Use the `showDefaultValue` attribute instead of adding default in 
description.
   



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