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).

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1685318 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ramkumar Aiyengar 2015-06-13 20:22:53 +00:00
parent 859415c7e1
commit a7e678d55b
4 changed files with 28 additions and 23 deletions

View File

@ -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

View File

@ -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:

View File

@ -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>

View File

@ -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>");
}
}