You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2014/03/24 05:54:24 UTC

svn commit: r1580740 - in /lucene/dev/branches/branch_4x: ./ solr/ solr/solrj/ solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java

Author: markrmiller
Date: Mon Mar 24 04:54:23 2014
New Revision: 1580740

URL: http://svn.apache.org/r1580740
Log:
SOLR-5884: Name executor threads and use execturo shutdown rather than shutdownNow.

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/solr/   (props changed)
    lucene/dev/branches/branch_4x/solr/solrj/   (props changed)
    lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java

Modified: lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java?rev=1580740&r1=1580739&r2=1580740&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java (original)
+++ lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java Mon Mar 24 04:54:23 2014
@@ -73,6 +73,7 @@ import org.apache.solr.common.params.Mod
 import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.common.util.ContentStream;
 import org.apache.solr.common.util.NamedList;
+import org.apache.solr.common.util.SolrjNamedThreadFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -234,7 +235,7 @@ public class HttpSolrServer extends Solr
   public HttpUriRequestResponse httpUriRequest(final SolrRequest request, final ResponseParser processor) throws SolrServerException, IOException {
     HttpUriRequestResponse mrr = new HttpUriRequestResponse();
     final HttpRequestBase method = createMethod(request);
-    ExecutorService pool = Executors.newFixedThreadPool(1);
+    ExecutorService pool = Executors.newFixedThreadPool(1, new SolrjNamedThreadFactory("httpUriRequest"));
     try {
       mrr.future = pool.submit(new Callable<NamedList<Object>>(){
 
@@ -244,7 +245,7 @@ public class HttpSolrServer extends Solr
         }});
  
     } finally {
-      pool.shutdownNow();
+      pool.shutdown();
     }
     assert method != null;
     mrr.httpUriRequest = method;