lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1575722 - in /lucene/dev/branches/branch_4x: ./ solr/ solr/CHANGES.txt solr/solrj/ solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java
Date Sun, 09 Mar 2014 16:25:10 GMT
Author: erick
Date: Sun Mar  9 16:25:10 2014
New Revision: 1575722

URL: http://svn.apache.org/r1575722
Log:
SOLR-5825, Separate http request creation and execution in SolrJ. Thanks Steve.

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/solr/   (props changed)
    lucene/dev/branches/branch_4x/solr/CHANGES.txt   (contents, 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/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/CHANGES.txt?rev=1575722&r1=1575721&r2=1575722&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_4x/solr/CHANGES.txt Sun Mar  9 16:25:10 2014
@@ -141,6 +141,9 @@ Other Changes
 * SOLR-5796: Make how long we are willing to wait for a core to see the ZK
   advertised leader in it's local state configurable. 
   (Timothy Potter via Mark Miller)
+  
+* SOLR-5825: Separate http request creating and execution in SolrJ
+  (Steven Bower via Erick Erickson)
 
 ==================  4.7.0 ==================
 

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=1575722&r1=1575721&r2=1575722&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
Sun Mar  9 16:25:10 2014
@@ -199,8 +199,11 @@ public class HttpSolrServer extends Solr
     return request(request, responseParser);
   }
   
-  public NamedList<Object> request(final SolrRequest request,
-      final ResponseParser processor) throws SolrServerException, IOException {
+  public NamedList<Object> request(final SolrRequest request, final ResponseParser
processor) throws SolrServerException, IOException {
+    return executeMethod(createMethod(request),processor);
+  }
+  
+  protected HttpRequestBase createMethod(final SolrRequest request) throws IOException, SolrServerException
{
     HttpRequestBase method = null;
     InputStream is = null;
     SolrParams params = request.getParams();
@@ -382,6 +385,10 @@ public class HttpSolrServer extends Solr
       throw new SolrServerException("error reading streams", ex);
     }
     
+    return method;
+  }
+  
+  protected NamedList<Object> executeMethod(HttpRequestBase method, final ResponseParser
processor) throws SolrServerException {
     // XXX client already has this set, is this needed?
     method.getParams().setParameter(ClientPNames.HANDLE_REDIRECTS,
         followRedirects);



Mime
View raw message