Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-11946

Move bin/solr arg-parsing logic to Java

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 8.0
    • 8.1, 9.0
    • scripts and tools
    • None

    Description

      Currently, there is logic in three different places that parses arguments for the bin/solr scripts. There is logic in the scripts themselves (bin/solr, bin/solr.cmd), and there is logic in Java to parse the arguments sent by the scripts themselves (SolrCLI.java.

      This creates maintenance burden. It makes it easy for inconsistencies/bugs to creep into the scripts (see SOLR-11840 and SOLR-11441, for a few examples). It adds work when adding/removing/modifying bin/solr script behavior. And it forces anyone hoping to improve the scripts to be conversant in both bash and Windows batch scripting.

      It would be a big help if all the argument parsing was done on the Java side, and little or none was done in the scripts themselves. There are a few situations in which this is difficult, but in no cases is it impossible.

      We should move this logic into Java-land.

      Attachments

        1. SOLR-11946.patch
          64 kB
          Jason Gerlowski

        Issue Links

          Activity

            People

              Unassigned Unassigned
              gerlowskija Jason Gerlowski
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: