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

add a function to set curl_url in scripts-util

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.4.1
    • Fix Version/s: 3.1, 4.0-ALPHA
    • Component/s: replication (scripts)
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: