You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2015/08/03 20:58:00 UTC
svn commit: r1693955 - in /lucene/dev/branches/branch_5x: ./ solr/
solr/core/ solr/core/src/java/org/apache/solr/request/
solr/core/src/java/org/apache/solr/servlet/
solr/core/src/java/org/apache/solr/util/ solr/solrj/
solr/solrj/src/java/org/apache/so...
Author: noble
Date: Mon Aug 3 18:58:00 2015
New Revision: 1693955
URL: http://svn.apache.org/r1693955
Log:
SOLR-6625: Remove the HttpContext which provides our request
Removed:
lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/request/SolrQueryRequestContext.java
lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/util/SolrHttpClient.java
lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrHttpContext.java
Modified:
lucene/dev/branches/branch_5x/ (props changed)
lucene/dev/branches/branch_5x/solr/ (props changed)
lucene/dev/branches/branch_5x/solr/core/ (props changed)
lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
lucene/dev/branches/branch_5x/solr/solrj/ (props changed)
lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientConfigurer.java
lucene/dev/branches/branch_5x/solr/test-framework/ (props changed)
lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java
lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/util/BaseTestHarness.java
Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java?rev=1693955&r1=1693954&r2=1693955&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java Mon Aug 3 18:58:00 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/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientConfigurer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientConfigurer.java?rev=1693955&r1=1693954&r2=1693955&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientConfigurer.java (original)
+++ lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientConfigurer.java Mon Aug 3 18:58:00 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/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java?rev=1693955&r1=1693954&r2=1693955&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java (original)
+++ lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java Mon Aug 3 18:58:00 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/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java?rev=1693955&r1=1693954&r2=1693955&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java (original)
+++ lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java Mon Aug 3 18:58:00 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/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java?rev=1693955&r1=1693954&r2=1693955&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java (original)
+++ lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java Mon Aug 3 18:58:00 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/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/util/BaseTestHarness.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/util/BaseTestHarness.java?rev=1693955&r1=1693954&r2=1693955&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/util/BaseTestHarness.java (original)
+++ lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/util/BaseTestHarness.java Mon Aug 3 18:58:00 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();