aryangupta1998 commented on a change in pull request #2357:
URL: https://github.com/apache/ozone/pull/2357#discussion_r666506827
##########
File path:
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/bucket/CreateBucketHandler.java
##########
@@ -60,9 +67,18 @@
public void execute(OzoneClient client, OzoneAddress address)
throws IOException {
- BucketArgs.Builder bb = new BucketArgs.Builder()
- .setStorageType(StorageType.DEFAULT)
- .setVersioning(false);
+ BucketArgs.Builder bb;
+ if (bucketType.equals(BucketType.OBJECT_STORE) || bucketType
+ .equals(BucketType.FSO)) {
+ bb = new BucketArgs.Builder().setStorageType(StorageType.DEFAULT)
+ .setVersioning(false).setBucketType(bucketType);
+ } else {
+ throw new IllegalArgumentException(
Review comment:
We have introduced an enum to check the required bucket types, now we
don't need this exception hence, removed 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: [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]