You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "ddanielr (via GitHub)" <gi...@apache.org> on 2025/09/23 16:22:31 UTC

[PR] Uses Parameters annotation for command name [accumulo]

ddanielr opened a new pull request, #5922:
URL: https://github.com/apache/accumulo/pull/5922

   Moves the command name into the Parameters annotation. 
   This makes the command name easier to track and accessible by annotation processors


-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Uses Parameters annotation for command name [accumulo]

Posted by "ddanielr (via GitHub)" <gi...@apache.org>.
ddanielr merged PR #5922:
URL: https://github.com/apache/accumulo/pull/5922


-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Uses Parameters annotation for command name [accumulo]

Posted by "ctubbsii (via GitHub)" <gi...@apache.org>.
ctubbsii commented on PR #5922:
URL: https://github.com/apache/accumulo/pull/5922#issuecomment-3326000477

   > > @ddanielr I see you merged this into 2.1, but did not merge forward into main. It's currently holding up subsequent commits on the 2.1 branch from being merged to main. Are you working on that merge to main?
   > 
   > This was merged to main around 2pm est [6e3ca6a](https://github.com/apache/accumulo/commit/6e3ca6ae21ffa9a77511f4d1eba3012b2d50ad1a)
   
   That's not a merge commit. It looks like one, but only has one child. I think you squashed it locally when you tried to merge.


-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Uses Parameters annotation for command name [accumulo]

Posted by "ddanielr (via GitHub)" <gi...@apache.org>.
ddanielr commented on PR #5922:
URL: https://github.com/apache/accumulo/pull/5922#issuecomment-3325932698

   > @ddanielr I see you merged this into 2.1, but did not merge forward into main. It's currently holding up subsequent commits on the 2.1 branch from being merged to main. Are you working on that merge to main?
   This was merged to main around 2pm est
   https://github.com/apache/accumulo/commit/6e3ca6ae21ffa9a77511f4d1eba3012b2d50ad1a 


-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Uses Parameters annotation for command name [accumulo]

Posted by "ddanielr (via GitHub)" <gi...@apache.org>.
ddanielr commented on PR #5922:
URL: https://github.com/apache/accumulo/pull/5922#issuecomment-3326017789

   > > > @ddanielr I see you merged this into 2.1, but did not merge forward into main. It's currently holding up subsequent commits on the 2.1 branch from being merged to main. Are you working on that merge to main?
   > > 
   > > 
   > > This was merged to main around 2pm est [6e3ca6a](https://github.com/apache/accumulo/commit/6e3ca6ae21ffa9a77511f4d1eba3012b2d50ad1a)
   > 
   > That's not a merge commit. It looks like one, but only has one child. I think you squashed it locally when you tried to merge.
   
   Yeah I realized that after linking the commit.  Something else had been merged to main while I was dealing with the conflicts and I thought I had reset my branch state correctly. 
   
   Anyway I just completed the 2.1 -> main merge and pushed again. commit history on `main` now  includes 5315ad2ee9b17c5542d4ba3a3099266d20d78c55


-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Uses Parameters annotation for command name [accumulo]

Posted by "keith-turner (via GitHub)" <gi...@apache.org>.
keith-turner commented on code in PR #5922:
URL: https://github.com/apache/accumulo/pull/5922#discussion_r2372903268


##########
server/base/src/main/java/org/apache/accumulo/server/util/Admin.java:
##########
@@ -130,17 +132,20 @@ static class CheckTabletsCommand extends SubCommandOpts {
     String tableName = null;
   }
 
-  @Parameters(commandDescription = "stop the manager")
+  @Parameters(commandNames = "stopManager", commandDescription = "stop the manager")
   static class StopManagerCommand extends SubCommandOpts {}
 
   @Deprecated(since = "2.1.0")
-  @Parameters(commandDescription = "stop the master (DEPRECATED -- use stopManager instead)")
+  @Parameters(commandNames = "stopMaster",

Review Comment:
   This could be dropped in 4.0



-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Uses Parameters annotation for command name [accumulo]

Posted by "ddanielr (via GitHub)" <gi...@apache.org>.
ddanielr commented on PR #5922:
URL: https://github.com/apache/accumulo/pull/5922#issuecomment-3324843195

   > Does this function exactly the same in usage and help output?
   
   Yes. If a command name is not passed into the `addCommand` method then jcommander looks at that object's parameters and gets the commandName value from there. 
   
   Both methods end up calling `this.addCommand`
   
   ```
       public void addCommand(String name, Object object) {
           this.addCommand(name, object);
       }
   
       public void addCommand(Object object) {
           Parameters p = (Parameters)object.getClass().getAnnotation(Parameters.class);
           if (p != null && p.commandNames().length > 0) {
               String[] var3 = p.commandNames();
               int var4 = var3.length;
   
               for(int var5 = 0; var5 < var4; ++var5) {
                   String commandName = var3[var5];
                   this.addCommand(commandName, object);
               }
   
           } else {
               throw new ParameterException("Trying to add command " + object.getClass().getName() + " without specifying its names in @Parameters");
           }
       }
   ```
   


-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Uses Parameters annotation for command name [accumulo]

Posted by "ddanielr (via GitHub)" <gi...@apache.org>.
ddanielr commented on PR #5922:
URL: https://github.com/apache/accumulo/pull/5922#issuecomment-3324730963

   This is related to #4808 


-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Uses Parameters annotation for command name [accumulo]

Posted by "ctubbsii (via GitHub)" <gi...@apache.org>.
ctubbsii commented on PR #5922:
URL: https://github.com/apache/accumulo/pull/5922#issuecomment-3325879034

   @ddanielr I see you merged this into 2.1, but did not merge forward into main. It's currently holding up subsequent commits on the 2.1 branch from being merged to main. Are you working on that merge to main?


-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Uses Parameters annotation for command name [accumulo]

Posted by "keith-turner (via GitHub)" <gi...@apache.org>.
keith-turner commented on code in PR #5922:
URL: https://github.com/apache/accumulo/pull/5922#discussion_r2372911265


##########
server/base/src/main/java/org/apache/accumulo/server/util/Admin.java:
##########
@@ -130,17 +132,20 @@ static class CheckTabletsCommand extends SubCommandOpts {
     String tableName = null;
   }
 
-  @Parameters(commandDescription = "stop the manager")
+  @Parameters(commandNames = "stopManager", commandDescription = "stop the manager")
   static class StopManagerCommand extends SubCommandOpts {}
 
   @Deprecated(since = "2.1.0")
-  @Parameters(commandDescription = "stop the master (DEPRECATED -- use stopManager instead)")
+  @Parameters(commandNames = "stopMaster",

Review Comment:
   This PR is against 2.1, thought it was for main.  So comment may not be relevant.



-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Uses Parameters annotation for command name [accumulo]

Posted by "ddanielr (via GitHub)" <gi...@apache.org>.
ddanielr commented on code in PR #5922:
URL: https://github.com/apache/accumulo/pull/5922#discussion_r2372949187


##########
server/base/src/main/java/org/apache/accumulo/server/util/Admin.java:
##########
@@ -130,17 +132,20 @@ static class CheckTabletsCommand extends SubCommandOpts {
     String tableName = null;
   }
 
-  @Parameters(commandDescription = "stop the manager")
+  @Parameters(commandNames = "stopManager", commandDescription = "stop the manager")
   static class StopManagerCommand extends SubCommandOpts {}
 
   @Deprecated(since = "2.1.0")
-  @Parameters(commandDescription = "stop the master (DEPRECATED -- use stopManager instead)")
+  @Parameters(commandNames = "stopMaster",

Review Comment:
   Yeah I planned to merge this forward and can create a second PR for any differences in main. 



-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org