Skip to content

Apache Lucene open-source search software

SOLR-11722: Rename max-future-ms to maxFutureMs

David Smiley5a263814241b
diff --git a/solr/core/src/java/org/apache/solr/cloud/api/collections/TimeRoutedAlias.java b/solr/core/src/java/org/apache/solr/cloud/api/collections/TimeRoutedAlias.java
index 16529c8114f..feb0334e668 100644
--- a/solr/core/src/java/org/apache/solr/cloud/api/collections/TimeRoutedAlias.java
+++ b/solr/core/src/java/org/apache/solr/cloud/api/collections/TimeRoutedAlias.java
@@ -62,7 +62,7 @@ public class TimeRoutedAlias {
public static final String ROUTER_FIELD = ROUTER_PREFIX + "field";
public static final String ROUTER_START = ROUTER_PREFIX + "start";
public static final String ROUTER_INTERVAL = ROUTER_PREFIX + "interval";
- public static final String ROUTER_MAX_FUTURE = ROUTER_PREFIX + "max-future-ms";
+ public static final String ROUTER_MAX_FUTURE = ROUTER_PREFIX + "maxFutureMs";
public static final String ROUTER_AUTO_DELETE_AGE = ROUTER_PREFIX + "autoDeleteAge";
public static final String CREATE_COLLECTION_PREFIX = "create-collection.";
// plus TZ and NAME
diff --git a/solr/core/src/test/org/apache/solr/cloud/CreateRoutedAliasTest.java b/solr/core/src/test/org/apache/solr/cloud/CreateRoutedAliasTest.java
index c8529e3df4f..2742a43116d 100644
--- a/solr/core/src/test/org/apache/solr/cloud/CreateRoutedAliasTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/CreateRoutedAliasTest.java
@@ -116,7 +116,7 @@ public class CreateRoutedAliasTest extends SolrCloudTestCase {
" \"field\": \"evt_dt\",\n" +
" \"start\":\"NOW/DAY\",\n" + // small window for test failure once a day.
" \"interval\":\"+2HOUR\",\n" +
- " \"max-future-ms\":\"14400000\"\n" +
+ " \"maxFutureMs\":\"14400000\"\n" +
" },\n" +
//TODO should we use "NOW=" param? Won't work with v2 and is kinda a hack any way since intended for distrib
" \"create-collection\" : {\n" +
@@ -298,7 +298,7 @@ public class CreateRoutedAliasTest extends SolrCloudTestCase {
"&router.name=time" +
"&router.start=2018-01-15T00:00:00Z" +
"&router.interval=%2B30MINUTEx" + // bad; trailing 'x'
- "&router.max-future-ms=60000" +
+ "&router.maxFutureMs=60000" +
"&create-collection.collection.configName=_default" +
"&create-collection.numShards=1");
assertFailure(get, "Unit not recognized");
@@ -314,7 +314,7 @@ public class CreateRoutedAliasTest extends SolrCloudTestCase {
"&router.name=time" +
"&router.start=2018-01-15T00:00:00Z" +
"&router.interval=%2B30MINUTE" +
- "&router.max-future-ms=-60000" + // bad: negative
+ "&router.maxFutureMs=-60000" + // bad: negative
"&create-collection.collection.configName=_default" +
"&create-collection.numShards=1");
assertFailure(get, "must be >= 0");
@@ -330,7 +330,7 @@ public class CreateRoutedAliasTest extends SolrCloudTestCase {
"&router.name=time" +
"&router.start=2018-01-15T00:00:00Z" +
"&router.interval=%2B30MINUTE" +
- "&router.max-future-ms=SixtyThousandMilliseconds" + // bad
+ "&router.maxFutureMs=SixtyThousandMilliseconds" + // bad
"&create-collection.collection.configName=_default" +
"&create-collection.numShards=1");
assertFailure(get, "SixtyThousandMilliseconds"); //TODO improve SolrParams.getLong
diff --git a/solr/solr-ref-guide/src/collections-api.adoc b/solr/solr-ref-guide/src/collections-api.adoc
index ac8881b848f..b2d3cc4c259 100644
--- a/solr/solr-ref-guide/src/collections-api.adoc
+++ b/solr/solr-ref-guide/src/collections-api.adoc
@@ -532,7 +532,7 @@ automatically on the fly as new data arrives based on the parameters supplied in
the future.
[source,text]
----
-localhost:8983/solr/admin/collections?action=CREATEROUTEDALIAS&name=timedata&router.start=NOW/DAY&router.field=evt_dt&router.name=time&router.interval=%2B1DAY&router.max-future-ms=3600000&create-collection.collection.configName=myConfig&create-collection.numShards=2
+localhost:8983/solr/admin/collections?action=CREATEROUTEDALIAS&name=timedata&router.start=NOW/DAY&router.field=evt_dt&router.name=time&router.interval=%2B1DAY&router.maxFutureMs=3600000&create-collection.collection.configName=myConfig&create-collection.numShards=2
----
If run on Jan 15, 2018 The above will create an alias named timedata, that contains collections with names such as
@@ -540,7 +540,7 @@ If run on Jan 15, 2018 The above will create an alias named timedata, that conta
in `evt_dt` that is before or after 2018-01-15 will be rejected, until the last 60 minutes of 2018-01-15. After
2018-01-15T23:00:00 documents for either 2018-01-15 or 2018-01-16 will be accepted. As soon as the system receives a
document for an allowable time window for which there is no collection it will automatically create the next required
-collection (and potentially any intervening collections if router.interval is smaller than router.max-future-ms). Both
+collection (and potentially any intervening collections if router.interval is smaller than router.maxFutureMs). Both
the initial collection and any subsequent collections will be created using the specified configset. All Collection
creation parameters other than `name` are allowed, prefixed by `create-collection.`
@@ -585,7 +585,7 @@ A date math expression that will be appended to a timestamp to determine the nex
Any date math expression that can be evaluated if appended to a timestamp of the form 2018-01-15T16:17:18 will
work here. This param is required.
-`router.max-future-ms`::
+`router.maxFutureMs`::
The maximum milliseconds into the future that a document is allowed to have in `router.field` for it to be accepted
without error. If there was no limit, than an erroneous value could trigger many collections to be created.
The default is 10 minutes worth.
@@ -625,7 +625,7 @@ partiton is to be rejected and collections are created using a config set named
[source,text]
----
-localhost:8983/solr/admin/collections?action=CREATEROUTEDALIAS&name=myTimeData&router.start=NOW/DAY&router.field=evt_dt&router.name=time&router.interval=%2B1DAY&router.max-future-ms=3600000&create-collection.collection.configName=myConfig&create-collection.numShards=2
+localhost:8983/solr/admin/collections?action=CREATEROUTEDALIAS&name=myTimeData&router.start=NOW/DAY&router.field=evt_dt&router.name=time&router.interval=%2B1DAY&router.maxFutureMs=3600000&create-collection.collection.configName=myConfig&create-collection.numShards=2
----
*Output*
@@ -656,7 +656,7 @@ POST /api/c
"field": "evt_dt",
"start":"NOW/MINUTE",
"interval":"+2HOUR",
- "max-future-ms":"14400000"
+ "maxFutureMs":"14400000"
},
"create-collection" : {
"config":"_default",
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java
index 182bfce95b3..8826384956f 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java
@@ -1421,7 +1421,7 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
public static final String ROUTER_FIELD = "router.field";
public static final String ROUTER_START = "router.start";
public static final String ROUTER_INTERVAL = "router.interval";
- public static final String ROUTER_MAX_FUTURE = "router.max-future-ms";
+ public static final String ROUTER_MAX_FUTURE = "router.maxFutureMs";
private final String aliasName;
private final String routerField;
diff --git a/solr/solrj/src/resources/apispec/collections.Commands.json b/solr/solrj/src/resources/apispec/collections.Commands.json
index ec44348f276..dfdfd5207f8 100644
--- a/solr/solrj/src/resources/apispec/collections.Commands.json
+++ b/solr/solrj/src/resources/apispec/collections.Commands.json
@@ -182,9 +182,9 @@
"type": "string",
"description": "A specification of the width of the interval for each partition collection. For time based routing this should be a date math expression fragment starting with the + character."
},
- "max-future-ms": {
+ "maxFutureMs": {
"type": "integer",
- "description":"How many milliseconds into the future to accept document. Documents with a value in router.field that is greater than now() + max-future-ms will be rejected to avoid provisioning too much resources."
+ "description":"How many milliseconds into the future to accept document. Documents with a value in router.field that is greater than now() + maxFutureMs will be rejected to avoid provisioning too much resources."
}
"autoDeleteAge": {
"type": "string",