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

add a function to set curl_url in scripts-util

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 1.4.1
    • 3.1, 4.0-ALPHA
    • replication (scripts)
    • None

    Description

      abc/abo/commit/optimize/readercycle scripts have the following identical snippet to set curl_url:

      if [[ -n ${solr_url} ]]
      then
        curl_url=${solr_url}
      else
        if [[ -z ${solr_port} ]]
        then
          echo "Solr port number missing in $confFile or command line."
          echo "$USAGE"
          exit 1
        fi
      
        # use default hostname if not specified
        if [[ -z ${solr_hostname} ]]
        then
          solr_hostname=localhost
        fi
      
        # use default webapp name if not specified
        if [[ -z ${webapp_name} ]]
        then
          webapp_name=solr
        fi
        curl_url=http://${solr_hostname}:${solr_port}/${webapp_name}/update
      fi
      

      I think it should be moved to scripts-util in order to improve readability/maintainability.

      Attachments

        1. SOLR-2046.patch
          8 kB
          Koji Sekiguchi
        2. SOLR-2046.patch
          17 kB
          Koji Sekiguchi
        3. SOLR-2046.patch
          19 kB
          Koji Sekiguchi
        4. SOLR-2046.patch
          19 kB
          Koji Sekiguchi

        Activity

          People

            koji Koji Sekiguchi
            koji Koji Sekiguchi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: