Skip to content

Apache Lucene open-source search software

SOLR-7624: Correct wrong spelling of zkCredentialsProvider in solrcloud section of solr.xml. The older misspelling is still present (for purposes of branch_5x, to be removed in the next commit).

Ramkumar Aiyengara7e678d55bd0
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 06fa8d47077..4185e0561e2 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -90,6 +90,9 @@ Upgrading from Solr 5.2
factory, you may need to manually unlock by deleting the lock
file from filesystem / HDFS.
+* The zkCredientialsProvider element in solrcloud section of solr.xml is now deprecated.
+ Use the correct spelling (zkCredentialsProvider) instead.
+
Detailed Change List
----------------------
@@ -168,6 +171,10 @@ Other Changes
to extendReserveAndReleaseCommitPoint, and reverse the code to match.
(shalin, Shawn Heisey)
+* SOLR-7624: Add correct spelling (zkCredentialsProvider) as an alternative to
+ zkCredientialsProvider element in solrcloud section of solr.xml.
+ (Xu Zhang, Per Steffensen, Ramkumar Aiyengar, Mark Miller)
+
================== 5.2.1 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release
diff --git a/solr/core/src/java/org/apache/solr/core/SolrXmlConfig.java b/solr/core/src/java/org/apache/solr/core/SolrXmlConfig.java
index a889522f3ba..af4cc766f08 100644
--- a/solr/core/src/java/org/apache/solr/core/SolrXmlConfig.java
+++ b/solr/core/src/java/org/apache/solr/core/SolrXmlConfig.java
@@ -363,7 +363,8 @@ public class SolrXmlConfig {
case "zkACLProvider":
builder.setZkACLProviderClass(value);
break;
- case "zkCredientialsProvider":
+ case "zkCredientialsProvider": // deprecated
+ case "zkCredentialsProvider":
builder.setZkCredentialsProviderClass(value);
break;
default:
diff --git a/solr/core/src/test-files/solr/solr-50-all.xml b/solr/core/src/test-files/solr/solr-50-all.xml
index 86b777a4fd5..28b445c4754 100644
--- a/solr/core/src/test-files/solr/solr-50-all.xml
+++ b/solr/core/src/test-files/solr/solr-50-all.xml
@@ -37,6 +37,8 @@
<int name="hostPort">${hostPort:44}</int>
<int name="zkClientTimeout">77</int>
<str name="zkHost">testZkHost</str>
+ <str name="zkACLProvider">DefaultZkACLProvider</str>
+ <str name="zkCredentialsProvider">DefaultZkCredentialsProvider</str>
</solrcloud>
<logging>
diff --git a/solr/core/src/test/org/apache/solr/core/TestSolrXml.java b/solr/core/src/test/org/apache/solr/core/TestSolrXml.java
index 1ce163ae553..beea8da9e83 100644
--- a/solr/core/src/test/org/apache/solr/core/TestSolrXml.java
+++ b/solr/core/src/test/org/apache/solr/core/TestSolrXml.java
@@ -44,7 +44,7 @@ public class TestSolrXml extends SolrTestCaseJ4 {
@Rule
public ExpectedException expectedException = ExpectedException.none();
- // tmp dir, cleanedup automaticly.
+ // tmp dir, cleaned up automatically.
private static File solrHome = null;
private static SolrResourceLoader loader = null;
@@ -100,6 +100,8 @@ public class TestSolrXml extends SolrTestCaseJ4 {
assertEquals("trans cache size", 66, cfg.getTransientCacheSize());
assertEquals("zk client timeout", 77, ccfg.getZkClientTimeout());
assertEquals("zk host", "testZkHost", ccfg.getZkHost());
+ assertEquals("zk ACL provider", "DefaultZkACLProvider", ccfg.getZkACLProviderClass());
+ assertEquals("zk credentials provider", "DefaultZkCredentialsProvider", ccfg.getZkCredentialsProviderClass());
}
// Test a few property substitutions that happen to be in solr-50-all.xml.
@@ -139,7 +141,7 @@ public class TestSolrXml extends SolrTestCaseJ4 {
expectedException.expect(SolrException.class);
expectedException.expectMessage("transientCacheSize");
- NodeConfig cfg = SolrXmlConfig.fromString(loader, solrXml);
+ SolrXmlConfig.fromString(loader, solrXml); // return not used, only for validation
}
public void testIntAsLongOk() throws IOException {
@@ -156,7 +158,7 @@ public class TestSolrXml extends SolrTestCaseJ4 {
+ "</solr>";
expectedException.expect(SolrException.class);
expectedException.expectMessage("Multiple instances of solrcloud section found in solr.xml");
- NodeConfig cfg = SolrXmlConfig.fromString(loader, solrXml);
+ SolrXmlConfig.fromString(loader, solrXml); // return not used, only for validation
}
public void testMultiLoggingSectionError() throws IOException {
@@ -166,7 +168,7 @@ public class TestSolrXml extends SolrTestCaseJ4 {
+ "</solr>";
expectedException.expect(SolrException.class);
expectedException.expectMessage("Multiple instances of logging section found in solr.xml");
- NodeConfig cfg = SolrXmlConfig.fromString(loader, solrXml);
+ SolrXmlConfig.fromString(loader, solrXml); // return not used, only for validation
}
public void testMultiLoggingWatcherSectionError() throws IOException {
@@ -178,7 +180,7 @@ public class TestSolrXml extends SolrTestCaseJ4 {
expectedException.expect(SolrException.class);
expectedException.expectMessage("Multiple instances of logging/watcher section found in solr.xml");
- NodeConfig cfg = SolrXmlConfig.fromString(loader, solrXml);
+ SolrXmlConfig.fromString(loader, solrXml); // return not used, only for validation
}
public void testValidStringValueWhenBoolTypeIsExpected() throws IOException {
@@ -202,7 +204,7 @@ public class TestSolrXml extends SolrTestCaseJ4 {
expectedException.expect(SolrException.class);
expectedException.expectMessage("Error parsing 'maxUpdateConnections'");
- NodeConfig nodeConfig = SolrXmlConfig.fromString(loader, solrXml);
+ SolrXmlConfig.fromString(loader, solrXml); // return not used, only for validation
}
public void testFailAtConfigParseTimeWhenBoolTypeIsExpectedAndValueIsInvalidString() throws IOException {
@@ -210,7 +212,7 @@ public class TestSolrXml extends SolrTestCaseJ4 {
expectedException.expect(SolrException.class);
expectedException.expectMessage("invalid boolean value: NOT_A_BOOLEAN");
- NodeConfig nodeConfig = SolrXmlConfig.fromString(loader, solrXml);
+ SolrXmlConfig.fromString(loader, solrXml); // return not used, only for validation
}
public void testFailAtConfigParseTimeWhenIntTypeIsExpectedAndBoolTypeIsGiven() throws IOException {
@@ -221,7 +223,7 @@ public class TestSolrXml extends SolrTestCaseJ4 {
expectedException.expect(SolrException.class);
expectedException.expectMessage(String.format(Locale.ROOT, "Value of 'unknown-option' can not be parsed as 'int': \"%s\"", randomBoolean));
- NodeConfig nodeConfig = SolrXmlConfig.fromString(loader, solrXml);
+ SolrXmlConfig.fromString(loader, solrXml); // return not used, only for validation
}
public void testFailAtConfigParseTimeWhenUnrecognizedSolrCloudOptionWasFound() throws IOException {
@@ -229,8 +231,8 @@ public class TestSolrXml extends SolrTestCaseJ4 {
expectedException.expect(SolrException.class);
expectedException.expectMessage("Unknown configuration parameter in <solrcloud> section of solr.xml: unknown-option");
-
- NodeConfig nodeConfig = SolrXmlConfig.fromString(loader, solrXml);
+
+ SolrXmlConfig.fromString(loader, solrXml); // return not used, only for validation
}
public void testFailAtConfigParseTimeWhenUnrecognizedSolrOptionWasFound() throws IOException {
@@ -239,7 +241,7 @@ public class TestSolrXml extends SolrTestCaseJ4 {
expectedException.expect(SolrException.class);
expectedException.expectMessage("Unknown configuration value in solr.xml: unknown-bool-option");
- NodeConfig nodeConfig = SolrXmlConfig.fromString(loader, solrXml);
+ SolrXmlConfig.fromString(loader, solrXml); // return not used, only for validation
}
public void testFailAtConfigParseTimeWhenUnrecognizedLoggingOptionWasFound() throws IOException {
@@ -248,7 +250,7 @@ public class TestSolrXml extends SolrTestCaseJ4 {
expectedException.expect(SolrException.class);
expectedException.expectMessage("Unknown value in logwatcher config: unknown-option");
- NodeConfig nodeConfig = SolrXmlConfig.fromString(loader, solrXml);
+ SolrXmlConfig.fromString(loader, solrXml); // return not used, only for validation
}
public void testFailAtConfigParseTimeWhenLoggingConfigParamsAreDuplicated() throws IOException {
@@ -264,7 +266,7 @@ public class TestSolrXml extends SolrTestCaseJ4 {
expectedException.expect(SolrException.class);
expectedException.expectMessage("<logging> section of solr.xml contains duplicated 'class'");
- NodeConfig nodeConfig = SolrXmlConfig.fromString(loader, solrXml);
+ SolrXmlConfig.fromString(loader, solrXml); // return not used, only for validation
}
public void testFailAtConfigParseTimeWhenSolrCloudConfigParamsAreDuplicated() throws IOException {
@@ -283,7 +285,7 @@ public class TestSolrXml extends SolrTestCaseJ4 {
expectedException.expect(SolrException.class);
expectedException.expectMessage("<solrcloud> section of solr.xml contains duplicated 'zkClientTimeout'");
- NodeConfig nodeConfig = SolrXmlConfig.fromString(loader, solrXml);
+ SolrXmlConfig.fromString(loader, solrXml); // return not used, only for validation
}
@Ignore
@@ -300,34 +302,27 @@ public class TestSolrXml extends SolrTestCaseJ4 {
expectedException.expect(SolrException.class);
expectedException.expectMessage("Main section of solr.xml contains duplicated 'coreLoadThreads'");
- NodeConfig nodeConfig = SolrXmlConfig.fromString(loader, solrXml);
+ SolrXmlConfig.fromString(loader, solrXml); // return not used, only for validation
}
public void testCloudConfigRequiresHost() throws Exception {
-
expectedException.expect(SolrException.class);
expectedException.expectMessage("solrcloud section missing required entry 'host'");
SolrXmlConfig.fromString(loader, "<solr><solrcloud></solrcloud></solr>");
-
}
public void testCloudConfigRequiresHostPort() throws Exception {
-
expectedException.expect(SolrException.class);
expectedException.expectMessage("solrcloud section missing required entry 'hostPort'");
SolrXmlConfig.fromString(loader, "<solr><solrcloud><str name=\"host\">host</str></solrcloud></solr>");
-
}
public void testCloudConfigRequiresHostContext() throws Exception {
-
expectedException.expect(SolrException.class);
expectedException.expectMessage("solrcloud section missing required entry 'hostContext'");
SolrXmlConfig.fromString(loader, "<solr><solrcloud><str name=\"host\">host</str><int name=\"hostPort\">8983</int></solrcloud></solr>");
-
}
}
-