You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ds...@apache.org on 2021/11/16 03:20:14 UTC
[solr] branch main updated: SOLR-14781: Delete unused classes (#330)
This is an automated email from the ASF dual-hosted git repository.
dsmiley pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new 8479055 SOLR-14781: Delete unused classes (#330)
8479055 is described below
commit 847905520e417f3d0f813ecbc26c1fc806157ee4
Author: bszabo97 <79...@users.noreply.github.com>
AuthorDate: Tue Nov 16 04:20:09 2021 +0100
SOLR-14781: Delete unused classes (#330)
Co-authored-by: David Smiley <ds...@apache.org>
---
solr/CHANGES.txt | 2 +
.../analytics/function/reduction/MeanFunction.java | 7 ---
.../analytics/function/reduction/SumFunction.java | 7 ---
.../solr/analytics/util/OldAnalyticsParams.java | 34 -----------
.../apache/solr/handler/ContentStreamLoader.java | 49 ----------------
.../apache/solr/search/facet/FacetFieldMerger.java | 42 --------------
.../solr/search/stats/CachedSearcherStats.java | 22 -------
.../org/apache/solr/update/SolrCmdDistributor.java | 4 --
.../java/org/apache/solr/util/RedactionUtils.java | 55 ------------------
.../src/test/org/apache/hadoop/fs/HardLink.java | 14 -----
.../solr/core/BlobStoreTestRequestHandler.java | 62 --------------------
.../test/org/apache/solr/core/MockInfoBean.java | 65 ---------------------
.../solr/schema/ThrowErrorOnInitFieldType.java | 29 ----------
.../client/solrj/impl/SolrHttpClientBuilder.java | 5 --
.../apache/solr/common/cloud/LiveNodesWatcher.java | 26 ---------
.../solr/common/util/LinkedSimpleHashMap.java | 40 -------------
solr/solrj/src/java/org/noggit/CharArr.java | 67 ----------------------
.../solr/core/MockConcurrentMergeScheduler.java | 34 -----------
.../solr/util/BadMrClusterThreadsFilter.java | 37 ------------
19 files changed, 2 insertions(+), 599 deletions(-)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 24f20bd..1e755a7 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -419,6 +419,8 @@ Bug Fixes
* SOLR-15783: Prevent Logging MDC values from leaking between request threads, and set 'trace_id' in MDC as soon as it's available (hossman)
+* SOLR-14781: Removed many unused classes that accumulated over the years. (Bence Szabo, David Smiley)
+
================== 8.11.1 ==================
Bug Fixes
diff --git a/solr/contrib/analytics/src/java/org/apache/solr/analytics/function/reduction/MeanFunction.java b/solr/contrib/analytics/src/java/org/apache/solr/analytics/function/reduction/MeanFunction.java
index 26ad771..9636650 100644
--- a/solr/contrib/analytics/src/java/org/apache/solr/analytics/function/reduction/MeanFunction.java
+++ b/solr/contrib/analytics/src/java/org/apache/solr/analytics/function/reduction/MeanFunction.java
@@ -16,14 +16,12 @@
*/
package org.apache.solr.analytics.function.reduction;
-import java.io.Serializable;
import java.util.function.UnaryOperator;
import org.apache.solr.analytics.ExpressionFactory.CreatorFunction;
import org.apache.solr.analytics.function.ReductionFunction;
import org.apache.solr.analytics.function.reduction.data.CountCollector;
import org.apache.solr.analytics.function.reduction.data.CountCollector.ExpressionCountCollector;
-import org.apache.solr.analytics.function.reduction.data.ReductionData;
import org.apache.solr.analytics.function.reduction.data.ReductionDataCollector;
import org.apache.solr.analytics.function.reduction.data.SumCollector;
import org.apache.solr.analytics.value.AnalyticsValueStream;
@@ -89,9 +87,4 @@ public class MeanFunction extends AbstractDoubleValue implements ReductionFuncti
public ExpressionType getExpressionType() {
return ExpressionType.REDUCTION;
}
-
- protected static class SumData extends ReductionData implements Serializable {
- private static final long serialVersionUID = 5920718235872898338L;
- double sum;
- }
}
\ No newline at end of file
diff --git a/solr/contrib/analytics/src/java/org/apache/solr/analytics/function/reduction/SumFunction.java b/solr/contrib/analytics/src/java/org/apache/solr/analytics/function/reduction/SumFunction.java
index c8a4d05..3ac5842 100644
--- a/solr/contrib/analytics/src/java/org/apache/solr/analytics/function/reduction/SumFunction.java
+++ b/solr/contrib/analytics/src/java/org/apache/solr/analytics/function/reduction/SumFunction.java
@@ -16,12 +16,10 @@
*/
package org.apache.solr.analytics.function.reduction;
-import java.io.Serializable;
import java.util.function.UnaryOperator;
import org.apache.solr.analytics.ExpressionFactory.CreatorFunction;
import org.apache.solr.analytics.function.ReductionFunction;
-import org.apache.solr.analytics.function.reduction.data.ReductionData;
import org.apache.solr.analytics.function.reduction.data.ReductionDataCollector;
import org.apache.solr.analytics.function.reduction.data.SumCollector;
import org.apache.solr.analytics.value.AnalyticsValueStream;
@@ -84,9 +82,4 @@ public class SumFunction extends AbstractDoubleValue implements ReductionFunctio
public ExpressionType getExpressionType() {
return ExpressionType.REDUCTION;
}
-
- protected static class SumData extends ReductionData implements Serializable {
- private static final long serialVersionUID = 5920718235872898338L;
- double sum;
- }
}
\ No newline at end of file
diff --git a/solr/contrib/analytics/src/java/org/apache/solr/analytics/util/OldAnalyticsParams.java b/solr/contrib/analytics/src/java/org/apache/solr/analytics/util/OldAnalyticsParams.java
index 7a688d7..814ac8a 100644
--- a/solr/contrib/analytics/src/java/org/apache/solr/analytics/util/OldAnalyticsParams.java
+++ b/solr/contrib/analytics/src/java/org/apache/solr/analytics/util/OldAnalyticsParams.java
@@ -18,8 +18,6 @@ package org.apache.solr.analytics.util;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
import java.util.function.Predicate;
import java.util.regex.Pattern;
@@ -40,14 +38,6 @@ public interface OldAnalyticsParams {
public static final String OLD_EXPRESSION = "s|stat|statistic";
- public static class OldRequest {
- public String name;
- public Map<String,String> expressions = new HashMap<>();
- public Map<String,OldFieldFacet> fieldFacets = new HashMap<>();
- public Map<String,OldRangeFacet> rangeFacets = new HashMap<>();
- public Map<String,OldQueryFacet> queryFacets = new HashMap<>();
- }
-
public static final String FIELD_FACET = "(?:ff|fieldfacet)";
public static final String VALUE_FACET = "(?:vf|valuefacet)";
public static final String LIMIT = "(?:l|limit)";
@@ -57,15 +47,6 @@ public interface OldAnalyticsParams {
public static final String OLAP_SORT_EXPRESSION ="(?:ss|sortstat|sortstatistic)";
public static final String SORT_DIRECTION ="(?:sd|sortdirection)";
- public static class OldFieldFacet {
- public String field;
- public String showMissing;
- public String limit;
- public String offset;
- public String sortExpr;
- public String sortDir;
- }
-
public static class FieldFacetParamParser {
public static String regexParamList = LIMIT + "|" + OFFSET + "|" + SHOW_MISSING + "|" + OLAP_SORT_EXPRESSION + "|" + SORT_DIRECTION;
@@ -122,16 +103,6 @@ public interface OldAnalyticsParams {
public static final String INCLUDE_BOUNDARY = "(?:ib|includebound)";
public static final String OTHER_RANGE = "(?:or|otherrange)";
- public static class OldRangeFacet {
- public String field;
- public String start;
- public String end;
- public String gaps;
- public String hardend;
- public String[] include;
- public String[] others;
- }
-
public static class RangeFacetParamParser {
public static String regexParamList = START + "|" + END + "|" + GAP + "|" + HARDEND + "|" + INCLUDE_BOUNDARY + "|" + OTHER_RANGE;
@@ -165,11 +136,6 @@ public interface OldAnalyticsParams {
}
}
- public static class OldQueryFacet {
- public String name;
- public String[] queries;
- }
-
public static final String QUERY_FACET = "(?:qf|queryfacet)";
public static final String QUERY = "(?:q|query)";
diff --git a/solr/core/src/java/org/apache/solr/handler/ContentStreamLoader.java b/solr/core/src/java/org/apache/solr/handler/ContentStreamLoader.java
deleted file mode 100644
index 8632eae..0000000
--- a/solr/core/src/java/org/apache/solr/handler/ContentStreamLoader.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.handler;
-import org.apache.solr.common.util.ContentStream;
-import org.apache.solr.request.SolrQueryRequest;
-import org.apache.solr.response.SolrQueryResponse;
-
-
-/**
- * Load a {@link org.apache.solr.common.util.ContentStream} into Solr
- *
- **/
-public abstract class ContentStreamLoader {
-
- protected String errHeader;
-
- public String getErrHeader() {
- return errHeader;
- }
-
- public void setErrHeader(String errHeader) {
- this.errHeader = errHeader;
- }
-
- /**
- * Loaders are responsible for closing the stream
- *
- * @param req The input {@link org.apache.solr.request.SolrQueryRequest}
- * @param rsp The response, in case the Loader wishes to add anything
- * @param stream The {@link org.apache.solr.common.util.ContentStream} to add
- */
- public abstract void load(SolrQueryRequest req, SolrQueryResponse rsp, ContentStream stream) throws Exception;
-
-
-}
diff --git a/solr/core/src/java/org/apache/solr/search/facet/FacetFieldMerger.java b/solr/core/src/java/org/apache/solr/search/facet/FacetFieldMerger.java
index 7341729..3fbc39d 100644
--- a/solr/core/src/java/org/apache/solr/search/facet/FacetFieldMerger.java
+++ b/solr/core/src/java/org/apache/solr/search/facet/FacetFieldMerger.java
@@ -20,10 +20,8 @@ package org.apache.solr.search.facet;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Set;
import org.apache.solr.common.util.SimpleOrderedMap;
@@ -193,44 +191,4 @@ public class FacetFieldMerger extends FacetRequestSortedMerger<FacetField> {
}
return refinement;
}
-
- private static class FacetNumBucketsMerger extends FacetMerger {
- long sumBuckets;
- long shardsMissingSum;
- long shardsTruncatedSum;
- Set<Object> values;
-
- @Override
- public void merge(Object facetResult, Context mcontext) {
- SimpleOrderedMap<?> map = (SimpleOrderedMap<?>)facetResult;
- long numBuckets = ((Number)map.get("numBuckets")).longValue();
- sumBuckets += numBuckets;
-
- List<?> vals = (List<?>)map.get("vals");
- if (vals != null) {
- if (values == null) {
- values = new HashSet<>(vals.size()*4);
- }
- values.addAll(vals);
- if (numBuckets > values.size()) {
- shardsTruncatedSum += numBuckets - values.size();
- }
- } else {
- shardsMissingSum += numBuckets;
- }
- }
-
- @Override
- public void finish(Context mcontext) {
- // nothing to do
- }
-
- @Override
- public Object getMergedResult() {
- long exactCount = values == null ? 0 : values.size();
- return exactCount + shardsMissingSum + shardsTruncatedSum;
- // TODO: reduce count by (at least) number of buckets that fail to hit mincount (after merging)
- // that should make things match for most of the small tests at least
- }
- }
}
diff --git a/solr/core/src/java/org/apache/solr/search/stats/CachedSearcherStats.java b/solr/core/src/java/org/apache/solr/search/stats/CachedSearcherStats.java
deleted file mode 100644
index cfa71d1..0000000
--- a/solr/core/src/java/org/apache/solr/search/stats/CachedSearcherStats.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.search.stats;
-
-public abstract class CachedSearcherStats {
-
-
-}
diff --git a/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java b/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java
index ea2ae7b..dfba569 100644
--- a/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java
+++ b/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java
@@ -74,10 +74,6 @@ public class SolrCmdDistributor implements Closeable {
private final CompletionService<Object> completionService;
private final Set<Future<Object>> pending = new HashSet<>();
- public static interface AbortCheck {
- public boolean abortCheck();
- }
-
public SolrCmdDistributor(UpdateShardHandler updateShardHandler) {
this.clients = new StreamingSolrClients(updateShardHandler);
this.completionService = new ExecutorCompletionService<>(updateShardHandler.getUpdateExecutor());
diff --git a/solr/core/src/java/org/apache/solr/util/RedactionUtils.java b/solr/core/src/java/org/apache/solr/util/RedactionUtils.java
index 56909f4..1e1b3a4 100644
--- a/solr/core/src/java/org/apache/solr/util/RedactionUtils.java
+++ b/solr/core/src/java/org/apache/solr/util/RedactionUtils.java
@@ -18,10 +18,7 @@
package org.apache.solr.util;
import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
import java.util.Map;
-import java.util.Set;
import java.util.TreeMap;
import java.util.regex.Pattern;
@@ -56,58 +53,6 @@ public class RedactionUtils {
}
/**
- * A helper class to build unique mappings from original to redacted names.
- */
- public static final class RedactionContext {
- private Map<String, String> redactions = new HashMap<>();
- Map<String, Set<Integer>> uniqueCodes = new HashMap<>();
- // minimal(ish) hash per prefix
- Map<String, Integer> codeSpaces = new HashMap<>();
-
- /**
- * Add a name to be redacted.
- * @param name original name
- * @param redactionPrefix prefix for the redacted name
- */
- public void addName(String name, String redactionPrefix) {
- if (redactions.containsKey(name)) {
- return;
- }
- int codeSpace = codeSpaces.computeIfAbsent(redactionPrefix, p -> 4);
- int code = Math.abs(name.hashCode() % codeSpace);
- Set<Integer> uniqueCode = uniqueCodes.computeIfAbsent(redactionPrefix, p -> new HashSet<>());
- while (uniqueCode.contains(code)) {
- codeSpace = codeSpace << 1;
- codeSpaces.put(redactionPrefix, codeSpace);
- code = Math.abs(name.hashCode() % codeSpace);
- }
- uniqueCode.add(code);
- redactions.put(name, redactionPrefix + Integer.toString(code, Character.MAX_RADIX));
- }
-
- /**
- * Add a name that needs to be mapped to the same redacted format as another one.
- * @param original original name already mapped (will be added automatically if missing)
- * @param equivalent another name that needs to be mapped to the same redacted name
- * @param redactionPrefix prefix for the redacted name
- */
- public void addEquivalentName(String original, String equivalent, String redactionPrefix) {
- if (!redactions.containsKey(original)) {
- addName(original, redactionPrefix);
- }
- String redaction = redactions.get(original);
- redactions.put(equivalent, redaction);
- }
-
- /**
- * Get a map of original to redacted names.
- */
- public Map<String, String> getRedactions() {
- return redactions;
- }
- }
-
- /**
* Replace actual names found in a string with redacted names.
* @param redactions a map of original to redacted names
* @param data string to redact
diff --git a/solr/core/src/test/org/apache/hadoop/fs/HardLink.java b/solr/core/src/test/org/apache/hadoop/fs/HardLink.java
index 3b546ce..e043703 100644
--- a/solr/core/src/test/org/apache/hadoop/fs/HardLink.java
+++ b/solr/core/src/test/org/apache/hadoop/fs/HardLink.java
@@ -46,20 +46,6 @@ public class HardLink {
linkStats = new LinkStats();
}
- /**
- * This abstract class bridges the OS-dependent implementations of the
- * needed functionality for querying link counts.
- * The particular implementation class is chosen during
- * static initialization phase of the HardLink class.
- * The "getter" methods construct shell command strings.
- */
- private static abstract class HardLinkCommandGetter {
- /**
- * Get the command string to query the hardlink count of a file
- */
- abstract String[] linkCount(File file) throws IOException;
- }
-
/*
* ****************************************************
* Complexity is above. User-visible functionality is below
diff --git a/solr/core/src/test/org/apache/solr/core/BlobStoreTestRequestHandler.java b/solr/core/src/test/org/apache/solr/core/BlobStoreTestRequestHandler.java
deleted file mode 100644
index dda1eb3..0000000
--- a/solr/core/src/test/org/apache/solr/core/BlobStoreTestRequestHandler.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.core;
-
-import java.io.IOException;
-
-import org.apache.solr.handler.DumpRequestHandler;
-import org.apache.solr.request.SolrQueryRequest;
-import org.apache.solr.response.SolrQueryResponse;
-import org.apache.solr.util.plugin.SolrCoreAware;
-
-public class BlobStoreTestRequestHandler extends DumpRequestHandler implements Runnable, SolrCoreAware {
-
- private SolrCore core;
-
- private long version = 0;
- private String watchedVal = null;
-
- @Override
- public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throws IOException {
- super.handleRequestBody(req, rsp);
- rsp.add("class", this.getClass().getName());
- rsp.add("x", watchedVal);
- }
-
- @Override
- public void run() {
- RequestParams p = core.getSolrConfig().getRequestParams();
- RequestParams.ParamSet v = p.getParams("watched");
- if (v == null) {
- watchedVal = null;
- version = -1;
- return;
- }
- if (v.getVersion() != version) {
- watchedVal = v.getParams(PluginInfo.DEFAULTS).get("x");
- }
- }
-
- @Override
- public void inform(SolrCore core) {
- this.core = core;
- core.addConfListener(this);
- run();
-
- }
-
-}
diff --git a/solr/core/src/test/org/apache/solr/core/MockInfoBean.java b/solr/core/src/test/org/apache/solr/core/MockInfoBean.java
deleted file mode 100644
index 1217283..0000000
--- a/solr/core/src/test/org/apache/solr/core/MockInfoBean.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.core;
-
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.solr.metrics.MetricsMap;
-import org.apache.solr.metrics.SolrMetricProducer;
-import org.apache.solr.metrics.SolrMetricsContext;
-
-class MockInfoBean implements SolrInfoBean, SolrMetricProducer {
- Set<String> metricNames = ConcurrentHashMap.newKeySet();
- SolrMetricsContext solrMetricsContext;
-
- @Override
- public String getName() {
- return "mock";
- }
-
- @Override
- public Category getCategory() {
- return Category.OTHER;
- }
-
- @Override
- public String getDescription() {
- return "mock";
- }
-
- @Override
- public SolrMetricsContext getSolrMetricsContext() {
- return solrMetricsContext;
- }
-
- @Override
- public void initializeMetrics(SolrMetricsContext parentContext, String scope) {
- solrMetricsContext = parentContext.getChildContext(this);
- MetricsMap metricsMap = new MetricsMap(map -> {
- map.put("Integer", 123);
- map.put("Double",567.534);
- map.put("Long", 32352463l);
- map.put("Short", (short) 32768);
- map.put("Byte", (byte) 254);
- map.put("Float", 3.456f);
- map.put("String","testing");
- map.put("Object", new Object());
- });
- solrMetricsContext.gauge(metricsMap, true, getClass().getSimpleName(), getCategory().toString(), scope);
- }
-}
diff --git a/solr/core/src/test/org/apache/solr/schema/ThrowErrorOnInitFieldType.java b/solr/core/src/test/org/apache/solr/schema/ThrowErrorOnInitFieldType.java
deleted file mode 100644
index 0b5f78e..0000000
--- a/solr/core/src/test/org/apache/solr/schema/ThrowErrorOnInitFieldType.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.schema;
-
-import java.util.Map;
-
-/**
- * throws an {@link java.lang.Error} on init for testing purposes
- */
-public class ThrowErrorOnInitFieldType extends TextField {
-
- protected void init(IndexSchema schema, Map<String,String> args) {
- throw new Error("Doing my job, throwing java.lang.Error");
- }
-}
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrHttpClientBuilder.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrHttpClientBuilder.java
index 7b49ea18..a6b0ccf 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrHttpClientBuilder.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrHttpClientBuilder.java
@@ -16,7 +16,6 @@
*/
package org.apache.solr.client.solrj.impl;
-import org.apache.http.HttpRequestInterceptor;
import org.apache.http.auth.AuthSchemeProvider;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.config.Lookup;
@@ -34,10 +33,6 @@ public class SolrHttpClientBuilder {
return new SolrHttpClientBuilder();
}
- public interface HttpRequestInterceptorProvider {
- HttpRequestInterceptor getHttpRequestInterceptor();
- }
-
public interface CredentialsProviderProvider {
CredentialsProvider getCredentialsProvider();
}
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/LiveNodesWatcher.java b/solr/solrj/src/java/org/apache/solr/common/cloud/LiveNodesWatcher.java
deleted file mode 100644
index 8de2cce..0000000
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/LiveNodesWatcher.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.solr.common.cloud;
-
-import java.util.SortedSet;
-
-public interface LiveNodesWatcher {
-
- boolean onStateChanged(SortedSet<String> oldLiveNodes, SortedSet<String> newLiveNodes);
-
-}
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/LinkedSimpleHashMap.java b/solr/solrj/src/java/org/apache/solr/common/util/LinkedSimpleHashMap.java
deleted file mode 100644
index 6581c83..0000000
--- a/solr/solrj/src/java/org/apache/solr/common/util/LinkedSimpleHashMap.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.common.util;
-
-import org.apache.solr.cluster.api.SimpleMap;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.function.BiConsumer;
-
-public class LinkedSimpleHashMap<T> extends LinkedHashMap<String, T> implements SimpleMap<T> {
- @Override
- public T get(String key) {
- return super.get(key);
- }
-
- @Override
- public void forEachEntry(BiConsumer<String, ? super T> fun) {
-
- }
-
- @Override
- public Map<String, T> asMap() {
- return this;
- }
-}
diff --git a/solr/solrj/src/java/org/noggit/CharArr.java b/solr/solrj/src/java/org/noggit/CharArr.java
index 0431e10..6228f51 100644
--- a/solr/solrj/src/java/org/noggit/CharArr.java
+++ b/solr/solrj/src/java/org/noggit/CharArr.java
@@ -20,7 +20,6 @@ package org.noggit;
import java.io.IOException;
import java.io.Reader;
-import java.io.Writer;
import java.nio.CharBuffer;
public class CharArr implements CharSequence, Appendable {
@@ -325,70 +324,4 @@ public class CharArr implements CharSequence, Appendable {
}
}
-
-
- class CharArrWriter extends CharArr {
- protected Writer sink;
-
- @Override
- public void flush() {
- try {
- sink.write(buf, start, end - start);
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- start = end = 0;
- }
-
- @Override
- public void write(char b) {
- if (end >= buf.length) {
- flush();
- }
- unsafeWrite(b);
- }
-
- @Override
- public void write(char b[], int off, int len) {
- int space = buf.length - end;
- if (len < space) {
- unsafeWrite(b, off, len);
- } else if (len < buf.length) {
- unsafeWrite(b, off, space);
- flush();
- unsafeWrite(b, off + space, len - space);
- } else {
- flush();
- try {
- sink.write(b, off, len);
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- }
- }
-
- @Override
- public void write(String s, int stringOffset, int len) {
- int space = buf.length - end;
- if (len < space) {
- s.getChars(stringOffset, stringOffset + len, buf, end);
- end += len;
- } else if (len < buf.length) {
- // if the data to write is small enough, buffer it.
- s.getChars(stringOffset, stringOffset + space, buf, end);
- flush();
- s.getChars(stringOffset + space, stringOffset + len, buf, 0);
- end = len - space;
- } else {
- flush();
- // don't buffer, just write to sink
- try {
- sink.write(s, stringOffset, len);
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
-
- }
- }
- }
}
diff --git a/solr/test-framework/src/java/org/apache/solr/core/MockConcurrentMergeScheduler.java b/solr/test-framework/src/java/org/apache/solr/core/MockConcurrentMergeScheduler.java
deleted file mode 100644
index 347f7d1..0000000
--- a/solr/test-framework/src/java/org/apache/solr/core/MockConcurrentMergeScheduler.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.solr.core;
-
-import java.lang.invoke.MethodHandles;
-
-import org.apache.lucene.index.ConcurrentMergeScheduler;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class MockConcurrentMergeScheduler extends ConcurrentMergeScheduler {
- private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
-
- @Override
- protected void handleMergeException(Throwable exc) {
- // swallow the exception
- log.warn("Merge exception:", exc);
- }
-}
diff --git a/solr/test-framework/src/java/org/apache/solr/util/BadMrClusterThreadsFilter.java b/solr/test-framework/src/java/org/apache/solr/util/BadMrClusterThreadsFilter.java
deleted file mode 100644
index 3867e48..0000000
--- a/solr/test-framework/src/java/org/apache/solr/util/BadMrClusterThreadsFilter.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.util;
-
-import com.carrotsearch.randomizedtesting.ThreadFilter;
-
-public class BadMrClusterThreadsFilter implements ThreadFilter {
-
- @Override
- public boolean reject(Thread t) {
- String name = t.getName();
- if (name.startsWith("ForkJoinPool.")) {
- return true;
- } else if (name.startsWith("com.google.inject.internal.util.$Finalizer")) {
- return true;
- } else if (name.startsWith("IPC Client ")) {
- return true;
- } else if (name.startsWith("Timer-")) {
- return true;
- }
- return false;
- }
-}