Apache Lucene open-source search software
SOLR-10647: move the spec files to solrj
Noble Paulc5c05b46c438
diff --git a/solr/core/src/java/org/apache/solr/api/Api.java b/solr/core/src/java/org/apache/solr/api/Api.javaindex 8512c89c956..edc2206b4a6 100644--- a/solr/core/src/java/org/apache/solr/api/Api.java+++ b/solr/core/src/java/org/apache/solr/api/Api.java@@ -20,6 +20,7 @@ package org.apache.solr.api;import java.util.Map;import com.google.common.collect.ImmutableMap;+import org.apache.solr.common.SpecProvider;import org.apache.solr.common.util.ValidatingJsonMap;import org.apache.solr.request.SolrQueryRequest;import org.apache.solr.response.SolrQueryResponse;diff --git a/solr/core/src/java/org/apache/solr/api/ApiBag.java b/solr/core/src/java/org/apache/solr/api/ApiBag.javaindex adff11b6a9f..7f30602045a 100644--- a/solr/core/src/java/org/apache/solr/api/ApiBag.java+++ b/solr/core/src/java/org/apache/solr/api/ApiBag.java@@ -33,6 +33,8 @@ import java.util.stream.Collectors;import com.google.common.collect.ImmutableList;import com.google.common.collect.ImmutableSet;import org.apache.solr.common.SolrException;+import org.apache.solr.common.SpecProvider;+import org.apache.solr.common.util.CommandOperation;import org.apache.solr.common.util.Utils;import org.apache.solr.common.util.ValidatingJsonMap;import org.apache.solr.core.PluginBag;@@ -42,9 +44,8 @@ import org.apache.solr.request.SolrRequestHandler;import org.apache.solr.response.SolrQueryResponse;import org.apache.solr.security.AuthorizationContext;import org.apache.solr.security.PermissionNameProvider;-import org.apache.solr.common.util.CommandOperation;import org.apache.solr.util.JsonSchemaValidator;-import org.apache.solr.util.PathTrie;+import org.apache.solr.common.util.PathTrie;import org.slf4j.Logger;import org.slf4j.LoggerFactory;@@ -227,12 +228,6 @@ public class ApiBag {}}- public static SpecProvider getSpec(final String name) {- return () -> {- return ValidatingJsonMap.parse(APISPEC_LOCATION + name + ".json", APISPEC_LOCATION);- };- }-public static class ReqHandlerToApi extends Api implements PermissionNameProvider {SolrRequestHandler rh;@@ -257,13 +252,10 @@ public class ApiBag {public static List<Api> wrapRequestHandlers(final SolrRequestHandler rh, String... specs) {ImmutableList.Builder<Api> b = ImmutableList.builder();- for (String spec : specs) b.add(new ReqHandlerToApi(rh, ApiBag.getSpec(spec)));+ for (String spec : specs) b.add(new ReqHandlerToApi(rh, Utils.getSpec(spec)));return b.build();}- public static final String APISPEC_LOCATION = "apispec/";- public static final String INTROSPECT = "/_introspect";-public static final SpecProvider EMPTY_SPEC = () -> ValidatingJsonMap.EMPTY;public static final String HANDLER_NAME = "handlerName";@@ -276,7 +268,7 @@ public class ApiBag {public void registerLazy(PluginBag.PluginHolder<SolrRequestHandler> holder, PluginInfo info) {String specName = info.attributes.get("spec");if (specName == null) specName = "emptySpec";- register(new LazyLoadedApi(ApiBag.getSpec(specName), holder), Collections.singletonMap(HANDLER_NAME, info.attributes.get(NAME)));+ register(new LazyLoadedApi(Utils.getSpec(specName), holder), Collections.singletonMap(HANDLER_NAME, info.attributes.get(NAME)));}public static SpecProvider constructSpec(PluginInfo info) {@@ -286,7 +278,7 @@ public class ApiBag {Map map = (Map) specObj;return () -> ValidatingJsonMap.getDeepCopy(map, 4, false);} else {- return ApiBag.getSpec((String) specObj);+ return Utils.getSpec((String) specObj);}}diff --git a/solr/core/src/java/org/apache/solr/api/V2HttpCall.java b/solr/core/src/java/org/apache/solr/api/V2HttpCall.javaindex 76cba9c2ad0..36ca4867eb1 100644--- a/solr/core/src/java/org/apache/solr/api/V2HttpCall.java+++ b/solr/core/src/java/org/apache/solr/api/V2HttpCall.java@@ -49,7 +49,7 @@ import org.apache.solr.servlet.HttpSolrCall;import org.apache.solr.servlet.SolrDispatchFilter;import org.apache.solr.servlet.SolrRequestParsers;import org.apache.solr.util.JsonSchemaValidator;-import org.apache.solr.util.PathTrie;+import org.apache.solr.common.util.PathTrie;import org.slf4j.Logger;import org.slf4j.LoggerFactory;@@ -58,7 +58,7 @@ import static org.apache.solr.common.params.CommonParams.WT;import static org.apache.solr.servlet.SolrDispatchFilter.Action.ADMIN;import static org.apache.solr.servlet.SolrDispatchFilter.Action.PASSTHROUGH;import static org.apache.solr.servlet.SolrDispatchFilter.Action.PROCESS;-import static org.apache.solr.util.PathTrie.getPathSegments;+import static org.apache.solr.common.util.PathTrie.getPathSegments;// class that handle the '/v2' pathpublic class V2HttpCall extends HttpSolrCall {@@ -102,7 +102,7 @@ public class V2HttpCall extends HttpSolrCall {String collectionName = origCorename = corename = pieces.get(1);DocCollection collection = getDocCollection(collectionName);if (collection == null) {- if ( ! path.endsWith(ApiBag.INTROSPECT)) {+ if ( ! path.endsWith(CommonParams.INTROSPECT)) {throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "no such collection or alias");}} else {@@ -124,7 +124,7 @@ public class V2HttpCall extends HttpSolrCall {}if (core == null) {log.error(">> path: '" + path + "'");- if (path.endsWith(ApiBag.INTROSPECT)) {+ if (path.endsWith(CommonParams.INTROSPECT)) {initAdminRequest(path);return;} else {@@ -193,7 +193,7 @@ public class V2HttpCall extends HttpSolrCall {Map<String, String> parts) {fullPath = fullPath == null ? path : fullPath;Api api = requestHandlers.v2lookup(path, method, parts);- if (api == null && path.endsWith(ApiBag.INTROSPECT)) {+ if (api == null && path.endsWith(CommonParams.INTROSPECT)) {// the particular http method does not have any ,// just try if any other method has this pathapi = requestHandlers.v2lookup(path, null, parts);@@ -234,7 +234,7 @@ public class V2HttpCall extends HttpSolrCall {private static CompositeApi getSubPathApi(PluginBag<SolrRequestHandler> requestHandlers, String path, String fullPath, CompositeApi compositeApi) {- String newPath = path.endsWith(ApiBag.INTROSPECT) ? path.substring(0, path.length() - ApiBag.INTROSPECT.length()) : path;+ String newPath = path.endsWith(CommonParams.INTROSPECT) ? path.substring(0, path.length() - CommonParams.INTROSPECT.length()) : path;Map<String, Set<String>> subpaths = new LinkedHashMap<>();getSubPaths(newPath, requestHandlers.getApiBag(), subpaths);@@ -244,12 +244,12 @@ public class V2HttpCall extends HttpSolrCall {@Overridepublic void call(SolrQueryRequest req1, SolrQueryResponse rsp) {String prefix = null;- prefix = fullPath.endsWith(ApiBag.INTROSPECT) ?- fullPath.substring(0, fullPath.length() - ApiBag.INTROSPECT.length()) :+ prefix = fullPath.endsWith(CommonParams.INTROSPECT) ?+ fullPath.substring(0, fullPath.length() - CommonParams.INTROSPECT.length()) :fullPath;LinkedHashMap<String, Set<String>> result = new LinkedHashMap<>(subPaths.size());for (Map.Entry<String, Set<String>> e : subPaths.entrySet()) {- if (e.getKey().endsWith(ApiBag.INTROSPECT)) continue;+ if (e.getKey().endsWith(CommonParams.INTROSPECT)) continue;result.put(prefix + e.getKey(), e.getValue());}diff --git a/solr/core/src/java/org/apache/solr/handler/UpdateRequestHandlerApi.java b/solr/core/src/java/org/apache/solr/handler/UpdateRequestHandlerApi.javaindex 6ba3229c2f2..f7bc14072e5 100644--- a/solr/core/src/java/org/apache/solr/handler/UpdateRequestHandlerApi.java+++ b/solr/core/src/java/org/apache/solr/handler/UpdateRequestHandlerApi.java@@ -24,7 +24,7 @@ import java.util.Map;import com.google.common.collect.ImmutableMap;import org.apache.solr.common.SolrException;import org.apache.solr.api.Api;-import org.apache.solr.api.ApiBag;+import org.apache.solr.common.util.Utils;import org.apache.solr.request.SolrQueryRequest;import org.apache.solr.response.SolrQueryResponse;@@ -38,7 +38,7 @@ public class UpdateRequestHandlerApi extends UpdateRequestHandler {}private Api getApiImpl() {- return new Api(ApiBag.getSpec("core.Update")) {+ return new Api(Utils.getSpec("core.Update")) {@Overridepublic void call(SolrQueryRequest req, SolrQueryResponse rsp) {String path = req.getPath();diff --git a/solr/core/src/java/org/apache/solr/handler/admin/BaseHandlerApiSupport.java b/solr/core/src/java/org/apache/solr/handler/admin/BaseHandlerApiSupport.javaindex 083ec335f90..087c6f1d0a7 100644--- a/solr/core/src/java/org/apache/solr/handler/admin/BaseHandlerApiSupport.java+++ b/solr/core/src/java/org/apache/solr/handler/admin/BaseHandlerApiSupport.java@@ -28,7 +28,6 @@ import java.util.Objects;import com.google.common.collect.ImmutableList;import org.apache.solr.api.Api;-import org.apache.solr.api.ApiBag;import org.apache.solr.api.ApiSupport;import org.apache.solr.client.solrj.SolrRequest;import org.apache.solr.client.solrj.request.CollectionApiMapping.CommandMeta;@@ -73,7 +72,7 @@ public abstract class BaseHandlerApiSupport implements ApiSupport {private Api getApi(final V2EndPoint op) {final BaseHandlerApiSupport apiHandler = this;- return new Api(ApiBag.getSpec(op.getSpecName())) {+ return new Api(Utils.getSpec(op.getSpecName())) {@Overridepublic void call(SolrQueryRequest req, SolrQueryResponse rsp) {SolrParams params = req.getParams();diff --git a/solr/core/src/java/org/apache/solr/handler/admin/InfoHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/InfoHandler.javaindex c7cd0520be9..a2bfb5ba75e 100644--- a/solr/core/src/java/org/apache/solr/handler/admin/InfoHandler.java+++ b/solr/core/src/java/org/apache/solr/handler/admin/InfoHandler.java@@ -32,7 +32,7 @@ import org.apache.solr.response.SolrQueryResponse;import org.apache.solr.api.Api;import static java.util.Collections.singletonList;-import static org.apache.solr.api.ApiBag.getSpec;+import static org.apache.solr.common.util.Utils.getSpec;import static org.apache.solr.common.params.CommonParams.PATH;public class InfoHandler extends RequestHandlerBase {diff --git a/solr/core/src/java/org/apache/solr/handler/admin/SecurityConfHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/SecurityConfHandler.javaindex 63b93185697..6e81ccfb3bf 100644--- a/solr/core/src/java/org/apache/solr/handler/admin/SecurityConfHandler.java+++ b/solr/core/src/java/org/apache/solr/handler/admin/SecurityConfHandler.java@@ -45,7 +45,7 @@ import org.apache.solr.security.PermissionNameProvider;import org.apache.solr.common.util.CommandOperation;import org.apache.solr.api.Api;import org.apache.solr.api.ApiBag.ReqHandlerToApi;-import org.apache.solr.api.SpecProvider;+import org.apache.solr.common.SpecProvider;import org.apache.solr.util.JsonSchemaValidator;import org.slf4j.Logger;import org.slf4j.LoggerFactory;@@ -264,10 +264,10 @@ public abstract class SecurityConfHandler extends RequestHandlerBase implementssynchronized (this) {if (apis == null) {Collection<Api> apis = new ArrayList<>();- final SpecProvider authcCommands = ApiBag.getSpec("cluster.security.authentication.Commands");- final SpecProvider authzCommands = ApiBag.getSpec("cluster.security.authorization.Commands");- apis.add(new ReqHandlerToApi(this, ApiBag.getSpec("cluster.security.authentication")));- apis.add(new ReqHandlerToApi(this, ApiBag.getSpec("cluster.security.authorization")));+ final SpecProvider authcCommands = Utils.getSpec("cluster.security.authentication.Commands");+ final SpecProvider authzCommands = Utils.getSpec("cluster.security.authorization.Commands");+ apis.add(new ReqHandlerToApi(this, Utils.getSpec("cluster.security.authentication")));+ apis.add(new ReqHandlerToApi(this, Utils.getSpec("cluster.security.authorization")));SpecProvider authcSpecProvider = () -> {AuthenticationPlugin authcPlugin = cores.getAuthenticationPlugin();return authcPlugin != null && authcPlugin instanceof SpecProvider ?diff --git a/solr/core/src/java/org/apache/solr/security/BasicAuthPlugin.java b/solr/core/src/java/org/apache/solr/security/BasicAuthPlugin.javaindex 296a2a658b5..eab89e3ca4a 100644--- a/solr/core/src/java/org/apache/solr/security/BasicAuthPlugin.java+++ b/solr/core/src/java/org/apache/solr/security/BasicAuthPlugin.java@@ -39,7 +39,7 @@ import org.apache.http.message.BasicHeader;import org.apache.solr.common.SolrException;import org.apache.solr.common.util.ValidatingJsonMap;import org.apache.solr.common.util.CommandOperation;-import org.apache.solr.api.SpecProvider;+import org.apache.solr.common.SpecProvider;import org.slf4j.Logger;import org.slf4j.LoggerFactory;diff --git a/solr/core/src/java/org/apache/solr/security/RuleBasedAuthorizationPlugin.java b/solr/core/src/java/org/apache/solr/security/RuleBasedAuthorizationPlugin.javaindex c54453dd9a1..6bf2822d624 100644--- a/solr/core/src/java/org/apache/solr/security/RuleBasedAuthorizationPlugin.java+++ b/solr/core/src/java/org/apache/solr/security/RuleBasedAuthorizationPlugin.java@@ -27,8 +27,8 @@ import java.util.Map;import java.util.Set;import java.util.function.Function;-import org.apache.solr.api.ApiBag;-import org.apache.solr.api.SpecProvider;+import org.apache.solr.common.SpecProvider;+import org.apache.solr.common.util.Utils;import org.apache.solr.common.util.ValidatingJsonMap;import org.apache.solr.common.util.CommandOperation;import org.slf4j.Logger;@@ -238,7 +238,7 @@ public class RuleBasedAuthorizationPlugin implements AuthorizationPlugin, Config@Overridepublic ValidatingJsonMap getSpec() {- return ApiBag.getSpec("cluster.security.RuleBasedAuthorization").getSpec();+ return Utils.getSpec("cluster.security.RuleBasedAuthorization").getSpec();}}diff --git a/solr/core/src/java/org/apache/solr/security/Sha256AuthenticationProvider.java b/solr/core/src/java/org/apache/solr/security/Sha256AuthenticationProvider.javaindex 10ed71a4e1a..4b85c4558c7 100644--- a/solr/core/src/java/org/apache/solr/security/Sha256AuthenticationProvider.java+++ b/solr/core/src/java/org/apache/solr/security/Sha256AuthenticationProvider.java@@ -31,9 +31,9 @@ import java.util.Set;import com.google.common.collect.ImmutableSet;import org.apache.commons.codec.binary.Base64;import org.apache.solr.common.util.CommandOperation;+import org.apache.solr.common.util.Utils;import org.apache.solr.common.util.ValidatingJsonMap;-import org.apache.solr.api.ApiBag;import org.slf4j.Logger;import org.slf4j.LoggerFactory;@@ -161,7 +161,7 @@ public class Sha256AuthenticationProvider implements ConfigEditablePlugin, Basi@Overridepublic ValidatingJsonMap getSpec() {- return ApiBag.getSpec("cluster.security.BasicAuth.Commands").getSpec();+ return Utils.getSpec("cluster.security.BasicAuth.Commands").getSpec();}static final Set<String> supported_ops = ImmutableSet.of("set-user", "delete-user");diff --git a/solr/core/src/test/org/apache/solr/handler/admin/TestApiFramework.java b/solr/core/src/test/org/apache/solr/handler/admin/TestApiFramework.javaindex 2f4fcda97d2..83b1cf34010 100644--- a/solr/core/src/test/org/apache/solr/handler/admin/TestApiFramework.java+++ b/solr/core/src/test/org/apache/solr/handler/admin/TestApiFramework.java@@ -42,7 +42,7 @@ import org.apache.solr.response.SolrQueryResponse;import org.apache.solr.api.Api;import org.apache.solr.api.V2HttpCall;import org.apache.solr.common.util.CommandOperation;-import org.apache.solr.util.PathTrie;+import org.apache.solr.common.util.PathTrie;import static org.apache.solr.api.ApiBag.EMPTY_SPEC;import static org.apache.solr.client.solrj.SolrRequest.METHOD.GET;diff --git a/solr/core/src/test/org/apache/solr/util/JsonValidatorTest.java b/solr/core/src/test/org/apache/solr/util/JsonValidatorTest.javaindex 02e95f7de27..a5e50dd1a2b 100644--- a/solr/core/src/test/org/apache/solr/util/JsonValidatorTest.java+++ b/solr/core/src/test/org/apache/solr/util/JsonValidatorTest.java@@ -21,7 +21,6 @@ import java.util.List;import java.util.Map;import org.apache.solr.SolrTestCaseJ4;-import org.apache.solr.api.ApiBag;import org.apache.solr.common.util.ValidatingJsonMap;import org.apache.solr.common.util.StrUtils;import org.apache.solr.common.util.Utils;@@ -48,7 +47,7 @@ public class JsonValidatorTest extends SolrTestCaseJ4 {public void testSchemaValidation() {- ValidatingJsonMap spec = ApiBag.getSpec("collections.Commands").getSpec();+ ValidatingJsonMap spec = Utils.getSpec("collections.Commands").getSpec();Map createSchema = spec.getMap("commands", NOT_NULL).getMap("create-alias", NOT_NULL);JsonSchemaValidator validator = new JsonSchemaValidator(createSchema);List<String> errs = validator.validateJson(Utils.fromJSONString("{name : x, collections: [ c1 , c2]}"));@@ -181,7 +180,7 @@ public class JsonValidatorTest extends SolrTestCaseJ4 {}private void checkSchema(String name) {- ValidatingJsonMap spec = ApiBag.getSpec(name).getSpec();+ ValidatingJsonMap spec = Utils.getSpec(name).getSpec();Map commands = (Map) spec.get("commands");for (Object o : commands.entrySet()) {Map.Entry cmd = (Map.Entry) o;diff --git a/solr/core/src/java/org/apache/solr/api/SpecProvider.java b/solr/solrj/src/java/org/apache/solr/common/SpecProvider.javasimilarity index 96%rename from solr/core/src/java/org/apache/solr/api/SpecProvider.javarename to solr/solrj/src/java/org/apache/solr/common/SpecProvider.javaindex c373c999a3c..d111604487e 100644--- a/solr/core/src/java/org/apache/solr/api/SpecProvider.java+++ b/solr/solrj/src/java/org/apache/solr/common/SpecProvider.java@@ -15,7 +15,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/-package org.apache.solr.api;+package org.apache.solr.common;import org.apache.solr.common.util.ValidatingJsonMap;/**A generic interface for any class that is capable of providing its specification as a json schemadiff --git a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.javaindex dad586e60aa..3b24f224cd5 100644--- a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java+++ b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java@@ -17,6 +17,7 @@package org.apache.solr.common.params;import java.util.Arrays;+import java.util.Collections;import java.util.HashSet;import java.util.Locale;import java.util.Set;@@ -184,7 +185,7 @@ public interface CommonParams {String AUTOSCALING_PATH = "/admin/autoscaling";String AUTOSCALING_DIAGNOSTICS_PATH = "/admin/autoscaling/diagnostics";- Set<String> ADMIN_PATHS = new HashSet<>(Arrays.asList(+ Set<String> ADMIN_PATHS = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(CORES_HANDLER_PATH,COLLECTIONS_HANDLER_PATH,CONFIGSETS_HANDLER_PATH,@@ -192,7 +193,9 @@ public interface CommonParams {AUTHZ_PATH,METRICS_PATH,AUTOSCALING_PATH,- AUTOSCALING_DIAGNOSTICS_PATH));+ AUTOSCALING_DIAGNOSTICS_PATH)));+ String APISPEC_LOCATION = "apispec/";+ String INTROSPECT = "/_introspect";/** valid values for: <code>echoParams</code> */enum EchoParamStyle {diff --git a/solr/core/src/java/org/apache/solr/util/PathTrie.java b/solr/solrj/src/java/org/apache/solr/common/util/PathTrie.javasimilarity index 99%rename from solr/core/src/java/org/apache/solr/util/PathTrie.javarename to solr/solrj/src/java/org/apache/solr/common/util/PathTrie.javaindex ceaa5de4fbe..b02a3237d48 100644--- a/solr/core/src/java/org/apache/solr/util/PathTrie.java+++ b/solr/solrj/src/java/org/apache/solr/common/util/PathTrie.java@@ -15,7 +15,7 @@* limitations under the License.*/-package org.apache.solr.util;+package org.apache.solr.common.util;import java.util.ArrayList;import java.util.HashSet;diff --git a/solr/solrj/src/java/org/apache/solr/common/util/Utils.java b/solr/solrj/src/java/org/apache/solr/common/util/Utils.javaindex ce2c305e87d..b64f9712b28 100644--- a/solr/solrj/src/java/org/apache/solr/common/util/Utils.java+++ b/solr/solrj/src/java/org/apache/solr/common/util/Utils.java@@ -42,8 +42,10 @@ import org.apache.http.util.EntityUtils;import org.apache.solr.common.IteratorWriter;import org.apache.solr.common.MapWriter;import org.apache.solr.common.SolrException;+import org.apache.solr.common.SpecProvider;import org.apache.solr.common.cloud.SolrZkClient;import org.apache.solr.common.cloud.ZkOperation;+import org.apache.solr.common.params.CommonParams;import org.apache.zookeeper.KeeperException;import org.noggit.CharArr;import org.noggit.JSONParser;@@ -302,4 +304,10 @@ public class Utils {public static final Pattern ARRAY_ELEMENT_INDEX = Pattern.compile("(\\S*?)\\[(\\d+)\\]");++ public static SpecProvider getSpec(final String name) {+ return () -> {+ return ValidatingJsonMap.parse(CommonParams.APISPEC_LOCATION + name + ".json", CommonParams.APISPEC_LOCATION);+ };+ }}diff --git a/solr/core/src/resources/apispec/autoscaling.Commands.json b/solr/solrj/src/resources/apispec/autoscaling.Commands.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/autoscaling.Commands.jsonrename to solr/solrj/src/resources/apispec/autoscaling.Commands.jsondiff --git a/solr/core/src/resources/apispec/cluster.Commands.json b/solr/solrj/src/resources/apispec/cluster.Commands.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/cluster.Commands.jsonrename to solr/solrj/src/resources/apispec/cluster.Commands.jsondiff --git a/solr/core/src/resources/apispec/cluster.aliases.json b/solr/solrj/src/resources/apispec/cluster.aliases.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/cluster.aliases.jsonrename to solr/solrj/src/resources/apispec/cluster.aliases.jsondiff --git a/solr/core/src/resources/apispec/cluster.commandstatus.delete.json b/solr/solrj/src/resources/apispec/cluster.commandstatus.delete.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/cluster.commandstatus.delete.jsonrename to solr/solrj/src/resources/apispec/cluster.commandstatus.delete.jsondiff --git a/solr/core/src/resources/apispec/cluster.commandstatus.json b/solr/solrj/src/resources/apispec/cluster.commandstatus.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/cluster.commandstatus.jsonrename to solr/solrj/src/resources/apispec/cluster.commandstatus.jsondiff --git a/solr/core/src/resources/apispec/cluster.configs.Commands.json b/solr/solrj/src/resources/apispec/cluster.configs.Commands.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/cluster.configs.Commands.jsonrename to solr/solrj/src/resources/apispec/cluster.configs.Commands.jsondiff --git a/solr/core/src/resources/apispec/cluster.configs.delete.json b/solr/solrj/src/resources/apispec/cluster.configs.delete.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/cluster.configs.delete.jsonrename to solr/solrj/src/resources/apispec/cluster.configs.delete.jsondiff --git a/solr/core/src/resources/apispec/cluster.configs.json b/solr/solrj/src/resources/apispec/cluster.configs.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/cluster.configs.jsonrename to solr/solrj/src/resources/apispec/cluster.configs.jsondiff --git a/solr/core/src/resources/apispec/cluster.json b/solr/solrj/src/resources/apispec/cluster.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/cluster.jsonrename to solr/solrj/src/resources/apispec/cluster.jsondiff --git a/solr/core/src/resources/apispec/cluster.nodes.json b/solr/solrj/src/resources/apispec/cluster.nodes.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/cluster.nodes.jsonrename to solr/solrj/src/resources/apispec/cluster.nodes.jsondiff --git a/solr/core/src/resources/apispec/cluster.security.BasicAuth.Commands.json b/solr/solrj/src/resources/apispec/cluster.security.BasicAuth.Commands.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/cluster.security.BasicAuth.Commands.jsonrename to solr/solrj/src/resources/apispec/cluster.security.BasicAuth.Commands.jsondiff --git a/solr/core/src/resources/apispec/cluster.security.RuleBasedAuthorization.json b/solr/solrj/src/resources/apispec/cluster.security.RuleBasedAuthorization.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/cluster.security.RuleBasedAuthorization.jsonrename to solr/solrj/src/resources/apispec/cluster.security.RuleBasedAuthorization.jsondiff --git a/solr/core/src/resources/apispec/cluster.security.authentication.Commands.json b/solr/solrj/src/resources/apispec/cluster.security.authentication.Commands.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/cluster.security.authentication.Commands.jsonrename to solr/solrj/src/resources/apispec/cluster.security.authentication.Commands.jsondiff --git a/solr/core/src/resources/apispec/cluster.security.authentication.json b/solr/solrj/src/resources/apispec/cluster.security.authentication.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/cluster.security.authentication.jsonrename to solr/solrj/src/resources/apispec/cluster.security.authentication.jsondiff --git a/solr/core/src/resources/apispec/cluster.security.authorization.Commands.json b/solr/solrj/src/resources/apispec/cluster.security.authorization.Commands.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/cluster.security.authorization.Commands.jsonrename to solr/solrj/src/resources/apispec/cluster.security.authorization.Commands.jsondiff --git a/solr/core/src/resources/apispec/cluster.security.authorization.json b/solr/solrj/src/resources/apispec/cluster.security.authorization.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/cluster.security.authorization.jsonrename to solr/solrj/src/resources/apispec/cluster.security.authorization.jsondiff --git a/solr/core/src/resources/apispec/collections.Commands.json b/solr/solrj/src/resources/apispec/collections.Commands.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/collections.Commands.jsonrename to solr/solrj/src/resources/apispec/collections.Commands.jsondiff --git a/solr/core/src/resources/apispec/collections.collection.Commands.json b/solr/solrj/src/resources/apispec/collections.collection.Commands.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/collections.collection.Commands.jsonrename to solr/solrj/src/resources/apispec/collections.collection.Commands.jsondiff --git a/solr/core/src/resources/apispec/collections.collection.Commands.modify.json b/solr/solrj/src/resources/apispec/collections.collection.Commands.modify.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/collections.collection.Commands.modify.jsonrename to solr/solrj/src/resources/apispec/collections.collection.Commands.modify.jsondiff --git a/solr/core/src/resources/apispec/collections.collection.Commands.reload.json b/solr/solrj/src/resources/apispec/collections.collection.Commands.reload.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/collections.collection.Commands.reload.jsonrename to solr/solrj/src/resources/apispec/collections.collection.Commands.reload.jsondiff --git a/solr/core/src/resources/apispec/collections.collection.delete.json b/solr/solrj/src/resources/apispec/collections.collection.delete.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/collections.collection.delete.jsonrename to solr/solrj/src/resources/apispec/collections.collection.delete.jsondiff --git a/solr/core/src/resources/apispec/collections.collection.json b/solr/solrj/src/resources/apispec/collections.collection.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/collections.collection.jsonrename to solr/solrj/src/resources/apispec/collections.collection.jsondiff --git a/solr/core/src/resources/apispec/collections.collection.shards.Commands.json b/solr/solrj/src/resources/apispec/collections.collection.shards.Commands.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/collections.collection.shards.Commands.jsonrename to solr/solrj/src/resources/apispec/collections.collection.shards.Commands.jsondiff --git a/solr/core/src/resources/apispec/collections.collection.shards.shard.Commands.json b/solr/solrj/src/resources/apispec/collections.collection.shards.shard.Commands.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/collections.collection.shards.shard.Commands.jsonrename to solr/solrj/src/resources/apispec/collections.collection.shards.shard.Commands.jsondiff --git a/solr/core/src/resources/apispec/collections.collection.shards.shard.delete.json b/solr/solrj/src/resources/apispec/collections.collection.shards.shard.delete.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/collections.collection.shards.shard.delete.jsonrename to solr/solrj/src/resources/apispec/collections.collection.shards.shard.delete.jsondiff --git a/solr/core/src/resources/apispec/collections.collection.shards.shard.replica.delete.json b/solr/solrj/src/resources/apispec/collections.collection.shards.shard.replica.delete.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/collections.collection.shards.shard.replica.delete.jsonrename to solr/solrj/src/resources/apispec/collections.collection.shards.shard.replica.delete.jsondiff --git a/solr/core/src/resources/apispec/collections.json b/solr/solrj/src/resources/apispec/collections.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/collections.jsonrename to solr/solrj/src/resources/apispec/collections.jsondiff --git a/solr/core/src/resources/apispec/core.RealtimeGet.json b/solr/solrj/src/resources/apispec/core.RealtimeGet.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/core.RealtimeGet.jsonrename to solr/solrj/src/resources/apispec/core.RealtimeGet.jsondiff --git a/solr/core/src/resources/apispec/core.SchemaEdit.addCopyField.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.addCopyField.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/core.SchemaEdit.addCopyField.jsonrename to solr/solrj/src/resources/apispec/core.SchemaEdit.addCopyField.jsondiff --git a/solr/core/src/resources/apispec/core.SchemaEdit.addField.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.addField.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/core.SchemaEdit.addField.jsonrename to solr/solrj/src/resources/apispec/core.SchemaEdit.addField.jsondiff --git a/solr/core/src/resources/apispec/core.SchemaEdit.addFieldType.analyzers.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.addFieldType.analyzers.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/core.SchemaEdit.addFieldType.analyzers.jsonrename to solr/solrj/src/resources/apispec/core.SchemaEdit.addFieldType.analyzers.jsondiff --git a/solr/core/src/resources/apispec/core.SchemaEdit.addFieldType.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.addFieldType.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/core.SchemaEdit.addFieldType.jsonrename to solr/solrj/src/resources/apispec/core.SchemaEdit.addFieldType.jsondiff --git a/solr/core/src/resources/apispec/core.SchemaEdit.deleteCopyField.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.deleteCopyField.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/core.SchemaEdit.deleteCopyField.jsonrename to solr/solrj/src/resources/apispec/core.SchemaEdit.deleteCopyField.jsondiff --git a/solr/core/src/resources/apispec/core.SchemaEdit.deleteDynamicField.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.deleteDynamicField.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/core.SchemaEdit.deleteDynamicField.jsonrename to solr/solrj/src/resources/apispec/core.SchemaEdit.deleteDynamicField.jsondiff --git a/solr/core/src/resources/apispec/core.SchemaEdit.deleteField.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.deleteField.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/core.SchemaEdit.deleteField.jsonrename to solr/solrj/src/resources/apispec/core.SchemaEdit.deleteField.jsondiff --git a/solr/core/src/resources/apispec/core.SchemaEdit.deleteFieldType.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.deleteFieldType.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/core.SchemaEdit.deleteFieldType.jsonrename to solr/solrj/src/resources/apispec/core.SchemaEdit.deleteFieldType.jsondiff --git a/solr/core/src/resources/apispec/core.SchemaEdit.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/core.SchemaEdit.jsonrename to solr/solrj/src/resources/apispec/core.SchemaEdit.jsondiff --git a/solr/core/src/resources/apispec/core.SchemaRead.copyFields.json b/solr/solrj/src/resources/apispec/core.SchemaRead.copyFields.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/core.SchemaRead.copyFields.jsonrename to solr/solrj/src/resources/apispec/core.SchemaRead.copyFields.jsondiff --git a/solr/core/src/resources/apispec/core.SchemaRead.dynamicFields_fieldTypes.json b/solr/solrj/src/resources/apispec/core.SchemaRead.dynamicFields_fieldTypes.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/core.SchemaRead.dynamicFields_fieldTypes.jsonrename to solr/solrj/src/resources/apispec/core.SchemaRead.dynamicFields_fieldTypes.jsondiff --git a/solr/core/src/resources/apispec/core.SchemaRead.fields.json b/solr/solrj/src/resources/apispec/core.SchemaRead.fields.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/core.SchemaRead.fields.jsonrename to solr/solrj/src/resources/apispec/core.SchemaRead.fields.jsondiff --git a/solr/core/src/resources/apispec/core.SchemaRead.json b/solr/solrj/src/resources/apispec/core.SchemaRead.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/core.SchemaRead.jsonrename to solr/solrj/src/resources/apispec/core.SchemaRead.jsondiff --git a/solr/core/src/resources/apispec/core.Update.json b/solr/solrj/src/resources/apispec/core.Update.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/core.Update.jsonrename to solr/solrj/src/resources/apispec/core.Update.jsondiff --git a/solr/core/src/resources/apispec/core.config.Commands.addRequestHandler.properties.json b/solr/solrj/src/resources/apispec/core.config.Commands.addRequestHandler.properties.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/core.config.Commands.addRequestHandler.properties.jsonrename to solr/solrj/src/resources/apispec/core.config.Commands.addRequestHandler.properties.jsondiff --git a/solr/core/src/resources/apispec/core.config.Commands.generic.json b/solr/solrj/src/resources/apispec/core.config.Commands.generic.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/core.config.Commands.generic.jsonrename to solr/solrj/src/resources/apispec/core.config.Commands.generic.jsondiff --git a/solr/core/src/resources/apispec/core.config.Commands.json b/solr/solrj/src/resources/apispec/core.config.Commands.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/core.config.Commands.jsonrename to solr/solrj/src/resources/apispec/core.config.Commands.jsondiff --git a/solr/core/src/resources/apispec/core.config.Commands.runtimeLib.json b/solr/solrj/src/resources/apispec/core.config.Commands.runtimeLib.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/core.config.Commands.runtimeLib.jsonrename to solr/solrj/src/resources/apispec/core.config.Commands.runtimeLib.jsondiff --git a/solr/core/src/resources/apispec/core.config.Params.Commands.json b/solr/solrj/src/resources/apispec/core.config.Params.Commands.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/core.config.Params.Commands.jsonrename to solr/solrj/src/resources/apispec/core.config.Params.Commands.jsondiff --git a/solr/core/src/resources/apispec/core.config.Params.json b/solr/solrj/src/resources/apispec/core.config.Params.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/core.config.Params.jsonrename to solr/solrj/src/resources/apispec/core.config.Params.jsondiff --git a/solr/core/src/resources/apispec/core.config.json b/solr/solrj/src/resources/apispec/core.config.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/core.config.jsonrename to solr/solrj/src/resources/apispec/core.config.jsondiff --git a/solr/core/src/resources/apispec/core.system.blob.json b/solr/solrj/src/resources/apispec/core.system.blob.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/core.system.blob.jsonrename to solr/solrj/src/resources/apispec/core.system.blob.jsondiff --git a/solr/core/src/resources/apispec/core.system.blob.upload.json b/solr/solrj/src/resources/apispec/core.system.blob.upload.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/core.system.blob.upload.jsonrename to solr/solrj/src/resources/apispec/core.system.blob.upload.jsondiff --git a/solr/core/src/resources/apispec/cores.Commands.json b/solr/solrj/src/resources/apispec/cores.Commands.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/cores.Commands.jsonrename to solr/solrj/src/resources/apispec/cores.Commands.jsondiff --git a/solr/core/src/resources/apispec/cores.Status.json b/solr/solrj/src/resources/apispec/cores.Status.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/cores.Status.jsonrename to solr/solrj/src/resources/apispec/cores.Status.jsondiff --git a/solr/core/src/resources/apispec/cores.core.Commands.json b/solr/solrj/src/resources/apispec/cores.core.Commands.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/cores.core.Commands.jsonrename to solr/solrj/src/resources/apispec/cores.core.Commands.jsondiff --git a/solr/core/src/resources/apispec/cores.core.Commands.split.json b/solr/solrj/src/resources/apispec/cores.core.Commands.split.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/cores.core.Commands.split.jsonrename to solr/solrj/src/resources/apispec/cores.core.Commands.split.jsondiff --git a/solr/core/src/resources/apispec/emptySpec.json b/solr/solrj/src/resources/apispec/emptySpec.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/emptySpec.jsonrename to solr/solrj/src/resources/apispec/emptySpec.jsondiff --git a/solr/core/src/resources/apispec/node.Commands.json b/solr/solrj/src/resources/apispec/node.Commands.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/node.Commands.jsonrename to solr/solrj/src/resources/apispec/node.Commands.jsondiff --git a/solr/core/src/resources/apispec/node.Info.json b/solr/solrj/src/resources/apispec/node.Info.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/node.Info.jsonrename to solr/solrj/src/resources/apispec/node.Info.jsondiff --git a/solr/core/src/resources/apispec/node.invoke.json b/solr/solrj/src/resources/apispec/node.invoke.jsonsimilarity index 100%rename from solr/core/src/resources/apispec/node.invoke.jsonrename to solr/solrj/src/resources/apispec/node.invoke.jsondiff --git a/solr/core/src/test/org/apache/solr/api/TestPathTrie.java b/solr/solrj/src/test/org/apache/solr/common/util/TestPathTrie.javasimilarity index 96%rename from solr/core/src/test/org/apache/solr/api/TestPathTrie.javarename to solr/solrj/src/test/org/apache/solr/common/util/TestPathTrie.javaindex d4cbf32b102..2eea2db7ca8 100644--- a/solr/core/src/test/org/apache/solr/api/TestPathTrie.java+++ b/solr/solrj/src/test/org/apache/solr/common/util/TestPathTrie.java@@ -15,7 +15,7 @@* limitations under the License.*/-package org.apache.solr.api;+package org.apache.solr.common.util;import java.util.HashMap;import java.util.HashSet;@@ -23,7 +23,7 @@ import java.util.Set;import com.google.common.collect.ImmutableSet;import org.apache.solr.SolrTestCaseJ4;-import org.apache.solr.util.PathTrie;+import org.apache.solr.common.util.PathTrie;import static java.util.Collections.emptyMap;import static java.util.Collections.singletonMap;