You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Anoop Sam John (Jira)" <ji...@apache.org> on 2020/05/06 17:08:00 UTC

[jira] [Created] (HBASE-24340) PerformanceEvaluation options should not mandate any specific order

Anoop Sam John created HBASE-24340:
--------------------------------------

             Summary: PerformanceEvaluation options should not mandate any specific order
                 Key: HBASE-24340
                 URL: https://issues.apache.org/jira/browse/HBASE-24340
             Project: HBase
          Issue Type: Improvement
    Affects Versions: 2.1.0
            Reporter: Anoop Sam John
            Assignee: Anoop Sam John


During parsing of options, there are some validations.  One such is checking whether autoFlush = false AND multiPut > 0.  This validation code mandates an order that autoFlush=true should be specified before adding multiPut = x in PE command.
{code}
final String multiPut = "--multiPut=";
      if (cmd.startsWith(multiPut)) {
        opts.multiPut = Integer.parseInt(cmd.substring(multiPut.length()));
        if (!opts.autoFlush && opts.multiPut > 0) {
          throw new IllegalArgumentException("autoFlush must be true when multiPut is more than 0");
        }
        continue;
      }
{code}
'autoFlush ' default value is false. If multiPut is specified prior to autoFlush in the PE command, we will end up throwing IllegalArgumentException.
Checking other validations, seems not having such issue.  Still better to move all the validations together into a private method and call that once the parse is over.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)