SOLR-6148: Trying to fix Jenkins failures by not LazyLoading the ParallelExecutor in CoreAdminHandler

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1601038 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Anshum Gupta 2014-06-06 23:44:43 +00:00
parent db538d864c
commit df6d417c44
1 changed files with 5 additions and 4 deletions

View File

@ -119,6 +119,8 @@ public class CoreAdminHandler extends RequestHandlerBase {
// Unlike most request handlers, CoreContainer initialization
// should happen in the constructor...
this.coreContainer = null;
this.parallelExecutor = Executors.newFixedThreadPool(50,
new DefaultSolrThreadFactory("parallelCoreAdminExecutor"));
}
@ -129,6 +131,8 @@ public class CoreAdminHandler extends RequestHandlerBase {
*/
public CoreAdminHandler(final CoreContainer coreContainer) {
this.coreContainer = coreContainer;
this.parallelExecutor = Executors.newFixedThreadPool(50,
new DefaultSolrThreadFactory("parallelCoreAdminExecutor"));
}
@ -186,10 +190,7 @@ public class CoreAdminHandler extends RequestHandlerBase {
handleRequestInternal(req, rsp, action);
} else {
ParallelCoreAdminHandlerThread parallelHandlerThread = new ParallelCoreAdminHandlerThread(req, rsp, action, taskObject);
if(parallelExecutor == null || parallelExecutor.isShutdown())
parallelExecutor = Executors.newFixedThreadPool(50,
new DefaultSolrThreadFactory("parallelCoreAdminExecutor"));
parallelExecutor.execute(parallelHandlerThread);
parallelExecutor.execute(parallelHandlerThread);
}
}