arvindKandpal-ksolves commented on code in PR #8905:
URL: https://github.com/apache/hbase/pull/8905#discussion_r4639305333


##########
hbase-diagnostics/src/main/java/org/apache/hadoop/hbase/wal/WALPerformanceEvaluation.java:
##########
@@ -233,6 +233,9 @@ public int run(String[] args) throws Exception {
         } else if (cmd.equals("-traceFreq")) {
           // keep it here for compatible
           System.err.println("-traceFreq is not supported any more");
+          if (i + 1 < args.length && !args[i + 1].startsWith("-")) {
+            i++;
+          }

Review Comment:
   @liuxiaocs7 Thanks for the review. This is intended, so I kept the code as 
is.
   
   -traceFreq has no effect since HBASE-25373, and since then a trailing 
-traceFreq without a value has been accepted with only a warning. This change 
keeps that, and only also skips a value when one is given, so older commands 
like "-traceFreq 0.5" work again. Rejecting a missing value for an option that 
is ignored would break commands that work today.
   
   The "prints usage when a value is missing" part of the description applies 
to options that actually read a value, such as -threads or -roll.



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

Reply via email to