lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject svn commit: r1693931 - in /lucene/dev/trunk/solr: core/src/java/org/apache/solr/request/ core/src/java/org/apache/solr/servlet/ core/src/java/org/apache/solr/util/ solrj/src/java/org/apache/solr/client/solrj/impl/ test-framework/src/java/org/apache/sol...
Date Mon, 03 Aug 2015 16:23:01 GMT
Author: noble
Date: Mon Aug  3 16:23:01 2015
New Revision: 1693931

URL: http://svn.apache.org/r1693931
Log:
SOLR-6625: Remove the HttpContext which provides our request

Removed:
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/request/SolrQueryRequestContext.java
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/util/SolrHttpClient.java
    lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrHttpContext.java
Modified:
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
    lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientConfigurer.java
    lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
    lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java
    lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
    lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/util/BaseTestHarness.java

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java?rev=1693931&r1=1693930&r2=1693931&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java Mon
Aug  3 16:23:01 2015
@@ -52,7 +52,6 @@ import org.apache.solr.core.SolrResource
 import org.apache.solr.core.SolrXmlConfig;
 import org.apache.solr.request.SolrRequestInfo;
 import org.apache.solr.security.AuthenticationPlugin;
-import org.apache.solr.util.SolrHttpClient;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -94,8 +93,6 @@ public class SolrDispatchFilter extends
   {
     log.info("SolrDispatchFilter.init(): {}", this.getClass().getClassLoader());
 
-    HttpClientUtil.HttpClientFactory.setHttpClientImpl(SolrHttpClient.SolrDefaultHttpClient.class,
SolrHttpClient.SolrSystemDefaultHttpClient.class);
-
     String exclude = config.getInitParameter("excludePatterns");
     if(exclude != null) {
       String[] excludeArray = exclude.split(",");

Modified: lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientConfigurer.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientConfigurer.java?rev=1693931&r1=1693930&r2=1693931&view=diff
==============================================================================
--- lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientConfigurer.java
(original)
+++ lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientConfigurer.java
Mon Aug  3 16:23:01 2015
@@ -81,18 +81,6 @@ public class HttpClientConfigurer {
     if(sslCheckPeerName == false) {
       HttpClientUtil.setHostNameVerifier(httpClient, SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
     }
-
-    // Intercept every request made through httpclient and validate it has a SolrHttpContext
object.
-    httpClient.addRequestInterceptor(new HttpRequestInterceptor() {
-      @Override
-      public void process(final HttpRequest request, final HttpContext context) {
-        // Verify that a context object was passed in
-        final Object solrContext = context.getAttribute(SolrHttpContext.SOLR_CONTEXT_KEY);
-        if (solrContext == null || solrContext instanceof SolrHttpContext == false) {
-          throw new SolrException(ErrorCode.BAD_REQUEST, "A SolrHttpContext object must be
passed in as context. Context: " + context);
-        }
-      }
-    });
   }
   
   public static boolean toBooleanDefaultIfNull(Boolean bool, boolean valueIfNull) {

Modified: lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java?rev=1693931&r1=1693930&r2=1693931&view=diff
==============================================================================
--- lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
(original)
+++ lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
Mon Aug  3 16:23:01 2015
@@ -39,7 +39,6 @@ import org.apache.solr.common.params.Mod
 import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.util.DateFormatUtil;
-import org.apache.solr.util.SolrHttpClient;
 import org.eclipse.jetty.servlet.ServletHolder;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -104,8 +103,6 @@ public abstract class BaseDistributedSea
   public static void initialize() {
     assumeFalse("SOLR-4147: ibm 64bit has jvm bugs!", Constants.JRE_IS_64BIT && Constants.JAVA_VENDOR.startsWith("IBM"));
     r = new Random(random().nextLong());
-
-    HttpClientUtil.HttpClientFactory.setHttpClientImpl(SolrHttpClient.SolrDefaultHttpClient.class,
SolrHttpClient.SolrSystemDefaultHttpClient.class);
   }
   
   /**

Modified: lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java?rev=1693931&r1=1693930&r2=1693931&view=diff
==============================================================================
--- lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java (original)
+++ lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java Mon
Aug  3 16:23:01 2015
@@ -26,7 +26,6 @@ import org.apache.solr.client.solrj.embe
 import org.apache.solr.client.solrj.impl.HttpClientUtil;
 import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.util.ExternalPaths;
-import org.apache.solr.util.SolrHttpClient;
 import org.eclipse.jetty.servlet.ServletHolder;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -44,10 +43,6 @@ abstract public class SolrJettyTestBase
 {
   private static Logger log = LoggerFactory.getLogger(SolrJettyTestBase.class);
 
-  static {
-    HttpClientUtil.HttpClientFactory.setHttpClientImpl(SolrHttpClient.SolrDefaultHttpClient.class,
SolrHttpClient.SolrSystemDefaultHttpClient.class);
-  }
-
   @BeforeClass
   public static void beforeSolrJettyTestBase() throws Exception {
 

Modified: lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java?rev=1693931&r1=1693930&r2=1693931&view=diff
==============================================================================
--- lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java (original)
+++ lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java Mon
Aug  3 16:23:01 2015
@@ -100,7 +100,6 @@ import org.apache.solr.util.AbstractSolr
 import org.apache.solr.util.DateFormatUtil;
 import org.apache.solr.util.RevertDefaultThreadHandlerRule;
 import org.apache.solr.util.SSLTestConfig;
-import org.apache.solr.util.SolrHttpClient;
 import org.apache.solr.util.TestHarness;
 import org.apache.zookeeper.KeeperException;
 import org.junit.AfterClass;
@@ -141,10 +140,6 @@ public abstract class SolrTestCaseJ4 ext
 
   public static int DEFAULT_CONNECTION_TIMEOUT = 60000;  // default socket connection timeout
in ms
 
-  static {
-    HttpClientUtil.HttpClientFactory.setHttpClientImpl(SolrHttpClient.SolrDefaultHttpClient.class,
SolrHttpClient.SolrSystemDefaultHttpClient.class);
-  }
-
   protected void writeCoreProperties(Path coreDirectory, String corename) throws IOException
{
     Properties props = new Properties();
     props.setProperty("name", corename);

Modified: lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/util/BaseTestHarness.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/util/BaseTestHarness.java?rev=1693931&r1=1693930&r2=1693931&view=diff
==============================================================================
--- lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/util/BaseTestHarness.java
(original)
+++ lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/util/BaseTestHarness.java
Mon Aug  3 16:23:01 2015
@@ -40,10 +40,6 @@ abstract public class BaseTestHarness {
   private static final ThreadLocal<DocumentBuilder> builderTL = new ThreadLocal<>();
   private static final ThreadLocal<XPath> xpathTL = new ThreadLocal<>();
 
-  static {
-    HttpClientUtil.HttpClientFactory.setHttpClientImpl(SolrHttpClient.SolrDefaultHttpClient.class,
SolrHttpClient.SolrSystemDefaultHttpClient.class);
-  }
-
   public static DocumentBuilder getXmlDocumentBuilder() {
     try {
       DocumentBuilder builder = builderTL.get();



Mime
View raw message