virajjasani commented on code in PR #5554:
URL: https://github.com/apache/hadoop/pull/5554#discussion_r1165897523


##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/tools/federation/RouterAdmin.java:
##########
@@ -462,6 +481,111 @@ public int run(String[] argv) throws Exception {
     return exitCode;
   }
 
+  private boolean addAllMount(String[] parameters, int i) throws IOException {
+    List<AddMountAttributes> addMountAttributesList = new ArrayList<>();
+    while (i < parameters.length) {
+      // Mandatory parameters
+      String mount = parameters[i++];
+      String[] nss = parameters[i++].split(",");
+      String dest = parameters[i++];
+
+      // Optional parameters
+      boolean readOnly = false;
+      boolean faultTolerant = false;
+      String owner = null;
+      String group = null;
+      FsPermission mode = null;
+      DestinationOrder order = DestinationOrder.HASH;
+      while (i < parameters.length && !",".equals(parameters[i])) {

Review Comment:
   I was thinking of the same, the only problem is, here we need to retain the 
value of `i` and for single add, we don't need to. Let me see how best we can 
refactor this. On the other hand, would you be fine if I do the refactor as a 
followup Jira?



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