Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-24340

PerformanceEvaluation options should not mandate any specific order

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.1.0
    • 3.0.0-alpha-1, 2.4.0
    • None
    • None
    • Reviewed

    Description

      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.

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

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

      Attachments

        Issue Links

          Activity

            People

              mohapatra.sambit Sambit Mohapatra
              anoop.hbase Anoop Sam John
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: