Uploaded image for project: 'PredictionIO (Retired)'
  1. PredictionIO (Retired)
  2. PIO-25

Don't attempt to start PostgreSQL when it's not being used

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 0.11.0-incubating
    • None
    • None

    Description

      When running: pio-start-all, even if your pio-env.sh file is setup to use HBase and not PostgreSQL you'll see "postgresql: unrecognised service":

      Starting Elasticsearch...
      Starting HBase...
      starting master, logging to /PredictionIO/vendors/hbase-1.2.2/bin/../logs/hbase--master-2898ebbfb9d1.out
      postgresql: unrecognized service
      Waiting 10 seconds for HBase to fully initialize...
      Starting PredictionIO Event Server...

      This is because pio-start-all simply tries to detect if PostgreSQL is running, if it isn't, then it will go ahead and try to start it:

      https://github.com/apache/incubator-predictionio/blob/develop/bin/pio-start-all#L64

      What would be better is if we checked PIO_STORAGE_REPOSITORIES_METADATA_SOURCE, PIO_STORAGE_REPOSITORIES_EVENTDATA_SOURCE and PIO_STORAGE_REPOSITORIES_MODELDATA_SOURCE to see if any of those have been set to PGSQL. If they have not been set to PGSQL then we don't need to attempt to start PostgreSQL every time.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dgjones David Jones
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: