Skip to content
Snippets Groups Projects
Commit d81c85ca authored by adam-m's avatar adam-m
Browse files

add more logs when starting/stopping solr process

parent d6f3403e
No related branches found
No related tags found
No related merge requests found
......@@ -258,8 +258,8 @@ void start() throws KeywordSearchModuleException {
final String SOLR_START_CMD = javaPath + MAX_SOLR_MEM_MB_PAR + " -DSTOP.PORT=8079 -DSTOP.KEY=" + KEY + " "
+ loggingProperties + " -jar start.jar";
logger.log(Level.INFO, "Starting Solr using: " + SOLR_START_CMD);
curSolrProcess = Runtime.getRuntime().exec(SOLR_START_CMD, null, solrFolder);
logger.log(Level.INFO, "Finished starting Solr");
try {
//block, give time to fully start the process
......@@ -293,7 +293,10 @@ synchronized void stop() throws KeywordSearchModuleException {
logger.log(Level.INFO, "Stopping Solr server from: " + solrFolder.getAbsolutePath());
//try graceful shutdown
Process stop = Runtime.getRuntime().exec(javaPath + " -DSTOP.PORT=8079 -DSTOP.KEY=" + KEY + " -jar start.jar --stop", null, solrFolder);
logger.log(Level.INFO, "Waiting for stopping Solr server");
stop.waitFor();
logger.log(Level.INFO, "Finished stopping Solr server");
//if still running, forcefully stop it
if (curSolrProcess != null) {
curSolrProcess.destroy();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment