lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject [26/43] lucene-solr:feature/autoscaling: SOLR-8045: Deploy V2 API at /v2 instead of /solr/v2
Date Tue, 14 Mar 2017 06:41:03 GMT
SOLR-8045: Deploy V2 API at /v2 instead of /solr/v2


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/0fb386a8
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/0fb386a8
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/0fb386a8

Branch: refs/heads/feature/autoscaling
Commit: 0fb386a864ff5b7d32af3bef3f7eeca4d009acc1
Parents: 6415d91
Author: Cao Manh Dat <datcm@apache.org>
Authored: Sat Mar 11 10:30:52 2017 +0700
Committer: Cao Manh Dat <datcm@apache.org>
Committed: Sat Mar 11 10:30:52 2017 +0700

----------------------------------------------------------------------
 dev-tools/scripts/smokeTestRelease.py           |  4 ++
 solr/CHANGES.txt                                |  2 +
 .../java/org/apache/solr/api/V2HttpCall.java    |  2 +-
 .../java/org/apache/solr/core/PluginBag.java    |  2 +-
 .../apache/solr/servlet/SolrDispatchFilter.java |  2 +-
 .../conf/solrconfig-managed-schema.xml          |  2 +-
 .../org/apache/solr/cloud/rule/RulesTest.java   |  2 +-
 .../apache/solr/core/TestDynamicLoading.java    |  2 +-
 .../apache/solr/core/TestSolrConfigHandler.java | 14 ++---
 .../apache/solr/handler/TestReqParamsAPI.java   |  3 ++
 .../solr/handler/V2ApiIntegrationTest.java      |  4 +-
 .../solr/rest/schema/TestBulkSchemaAPI.java     |  2 +-
 .../solr/security/BasicAuthIntegrationTest.java |  4 +-
 solr/server/etc/jetty.xml                       | 54 +++++++++++---------
 .../conf/solrconfig.xml                         |  2 +-
 .../solr/client/solrj/impl/CloudSolrClient.java |  4 +-
 .../solrj/embedded/SolrExampleJettyTest.java    |  2 +-
 17 files changed, 62 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0fb386a8/dev-tools/scripts/smokeTestRelease.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/smokeTestRelease.py b/dev-tools/scripts/smokeTestRelease.py
index f9c3499..b0e76e9 100644
--- a/dev-tools/scripts/smokeTestRelease.py
+++ b/dev-tools/scripts/smokeTestRelease.py
@@ -855,6 +855,10 @@ def testSolrExample(unpackPath, javaPath, isSrc):
     if s.find('<result name="response" numFound="3" start="0">') == -1:
       print('FAILED: response is:\n%s' % s)
       raise RuntimeError('query on solr example instance failed')
+    s = load('http://localhost:8983/v2/cores')
+    if s.find('"responseHeader":{"status":0,"QTime":1}') == -1:
+      print('FAILED: response is:\n%s' % s)
+      raise RuntimeError('query api v2 on solr example instance failed')
   finally:
     # Stop server:
     print('      stop server using: bin/solr stop -p 8983')

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0fb386a8/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 7285e4f..b164405 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -164,6 +164,8 @@ New Features
 
 * SOLR-9986: Implement DatePointField (Cao Manh Dat, Tomás Fernández Löbbe)
 
+* SOLR-8045: Deploy V2 API at /v2 instead of /solr/v2 (Cao Manh Dat, Noble Paul)
+
 Bug Fixes
 ----------------------
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0fb386a8/solr/core/src/java/org/apache/solr/api/V2HttpCall.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/api/V2HttpCall.java b/solr/core/src/java/org/apache/solr/api/V2HttpCall.java
index c996b25..fb4aa56 100644
--- a/solr/core/src/java/org/apache/solr/api/V2HttpCall.java
+++ b/solr/core/src/java/org/apache/solr/api/V2HttpCall.java
@@ -75,7 +75,7 @@ public class V2HttpCall extends HttpSolrCall {
 
   protected void init() throws Exception {
     String path = this.path;
-    String fullPath = path = path.substring(3);//strip off '/v2'
+    String fullPath = path = path.substring(7);//strip off '/____v2'
     try {
       pieces = getPathSegments(path);
       if (pieces.size() == 0) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0fb386a8/solr/core/src/java/org/apache/solr/core/PluginBag.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/core/PluginBag.java b/solr/core/src/java/org/apache/solr/core/PluginBag.java
index ad8bdec..65978f3 100644
--- a/solr/core/src/java/org/apache/solr/core/PluginBag.java
+++ b/solr/core/src/java/org/apache/solr/core/PluginBag.java
@@ -194,7 +194,7 @@ public class PluginBag<T> implements AutoCloseable {
       String registerAt = plugin.pluginInfo.attributes.get("registerPath");
       if (registerAt != null) {
         List<String> strs = StrUtils.splitSmart(registerAt, ',');
-        disableHandler = !strs.contains("/");
+        disableHandler = !strs.contains("/solr");
         registerApi = strs.contains("/v2");
       }
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0fb386a8/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java b/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
index ce65069..ff0db9b 100644
--- a/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
+++ b/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
@@ -388,7 +388,7 @@ public class SolrDispatchFilter extends BaseSolrFilter {
       path += request.getPathInfo();
     }
 
-    if (isV2Enabled && (path.startsWith("/v2/") || path.equals("/v2"))) {
+    if (isV2Enabled && (path.startsWith("/____v2/") || path.equals("/____v2"))) {
       return new V2HttpCall(this, cores, request, response, false);
     } else {
       return new HttpSolrCall(this, cores, request, response, retry);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0fb386a8/solr/core/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml
----------------------------------------------------------------------
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml
b/solr/core/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml
index 31bbbb3..abd4fbe 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml
@@ -40,7 +40,7 @@
   </requestHandler>
 
 
-  <requestHandler name="/dump" class="DumpRequestHandler" initParams="a" registerPath="/,/v2">
+  <requestHandler name="/dump" class="DumpRequestHandler" initParams="a" registerPath="/solr,/v2">
     <lst name="defaults">
       <str name="a">${my.custom.variable.a:A}</str>
       <str name="b">${my.custom.variable.b:B}</str>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0fb386a8/solr/core/src/test/org/apache/solr/cloud/rule/RulesTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/rule/RulesTest.java b/solr/core/src/test/org/apache/solr/cloud/rule/RulesTest.java
index 13649e1..d4a72bf 100644
--- a/solr/core/src/test/org/apache/solr/cloud/rule/RulesTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/rule/RulesTest.java
@@ -168,7 +168,7 @@ public class RulesTest extends SolrCloudTestCase {
   public void testInvokeApi() throws Exception {
     JettySolrRunner jetty = cluster.getRandomJetty(random());
     try (SolrClient client = getHttpSolrClient(jetty.getBaseUrl().toString())) {
-      GenericSolrRequest req =  new GenericSolrRequest(GET, "/v2/node/invoke", new ModifiableSolrParams()
+      GenericSolrRequest req =  new GenericSolrRequest(GET, "/____v2/node/invoke", new ModifiableSolrParams()
           .add("class", ImplicitSnitch.class.getName())
           .add("cores", "1")
           .add("freedisk", "1")

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0fb386a8/solr/core/src/test/org/apache/solr/core/TestDynamicLoading.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/core/TestDynamicLoading.java b/solr/core/src/test/org/apache/solr/core/TestDynamicLoading.java
index 8479ae4..306b4b2 100644
--- a/solr/core/src/test/org/apache/solr/core/TestDynamicLoading.java
+++ b/solr/core/src/test/org/apache/solr/core/TestDynamicLoading.java
@@ -88,7 +88,7 @@ public class TestDynamicLoading extends AbstractFullDistribZkTestBase {
 
 
     payload = "{\n" +
-        "'create-requesthandler' : { 'name' : '/test1', 'class': 'org.apache.solr.core.BlobStoreTestRequestHandler'
,registerPath: '/,/v2',  'runtimeLib' : true }\n" +
+        "'create-requesthandler' : { 'name' : '/test1', 'class': 'org.apache.solr.core.BlobStoreTestRequestHandler'
,registerPath: '/solr,/v2',  'runtimeLib' : true }\n" +
         "}";
 
     client = restTestHarnesses.get(random().nextInt(restTestHarnesses.size()));

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0fb386a8/solr/core/src/test/org/apache/solr/core/TestSolrConfigHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/core/TestSolrConfigHandler.java b/solr/core/src/test/org/apache/solr/core/TestSolrConfigHandler.java
index 3f85a79..ec81c25 100644
--- a/solr/core/src/test/org/apache/solr/core/TestSolrConfigHandler.java
+++ b/solr/core/src/test/org/apache/solr/core/TestSolrConfigHandler.java
@@ -86,7 +86,7 @@ public class TestSolrConfigHandler extends RestTestBase {
         "/solr", true, extraServlets);
     if (random().nextBoolean()) {
       log.info("These tests are run with V2 API");
-      restTestHarness.setServerProvider(() -> jetty.getBaseUrl().toString() + "/v2/cores/"
+ DEFAULT_TEST_CORENAME);
+      restTestHarness.setServerProvider(() -> jetty.getBaseUrl().toString() + "/____v2/cores/"
+ DEFAULT_TEST_CORENAME);
     }
   }
 
@@ -201,7 +201,7 @@ public class TestSolrConfigHandler extends RestTestBase {
         10);
 
     payload = "{\n" +
-        "'update-requesthandler' : { 'name' : '/x', 'class': 'org.apache.solr.handler.DumpRequestHandler'
,registerPath :'/,/v2', " +
+        "'update-requesthandler' : { 'name' : '/x', 'class': 'org.apache.solr.handler.DumpRequestHandler'
,registerPath :'/solr,/v2', " +
         " 'startup' : 'lazy' , 'a':'b' , 'defaults': {'def_a':'def A val', 'multival':['a','b','c']}}\n"
+
         "}";
     runConfigCommand(writeHarness, "/config?wt=json", payload);
@@ -442,7 +442,7 @@ public class TestSolrConfigHandler extends RestTestBase {
     payload = "{\n" +
         "    'add-requesthandler': {\n" +
         "        name : '/dump100',\n" +
-        "       registerPath :'/,/v2',"+
+        "       registerPath :'/solr,/v2',"+
     "        class : 'org.apache.solr.handler.DumpRequestHandler'," +
         "        suggester: [{name: s1,lookupImpl: FuzzyLookupFactory, dictionaryImpl : DocumentDictionaryFactory},"
+
         "                    {name: s2,lookupImpl: FuzzyLookupFactory , dictionaryImpl :
DocumentExpressionDictionaryFactory}]" +
@@ -467,7 +467,7 @@ public class TestSolrConfigHandler extends RestTestBase {
     payload = "{\n" +
         "'add-requesthandler' : { 'name' : '/dump101', 'class': " +
         "'" + CacheTest.class.getName() + "', " +
-        "    registerPath :'/,/v2'"+
+        "    registerPath :'/solr,/v2'"+
         ", 'startup' : 'lazy'}\n" +
         "}";
     runConfigCommand(writeHarness, "/config?wt=json", payload);
@@ -589,7 +589,7 @@ public class TestSolrConfigHandler extends RestTestBase {
         10);
 
     payload = "{\n" +
-        "'create-requesthandler' : { 'name' : '/d', registerPath :'/,/v2' , 'class': 'org.apache.solr.handler.DumpRequestHandler'
}\n" +
+        "'create-requesthandler' : { 'name' : '/d', registerPath :'/solr,/v2' , 'class':
'org.apache.solr.handler.DumpRequestHandler' }\n" +
         "}";
 
     TestSolrConfigHandler.runConfigCommand(harness, "/config?wt=json", payload);
@@ -619,7 +619,7 @@ public class TestSolrConfigHandler extends RestTestBase {
         5);
 
     payload = "{\n" +
-        "'create-requesthandler' : { 'name' : '/dump1', registerPath :'/,/v2' , 'class':
'org.apache.solr.handler.DumpRequestHandler', 'useParams':'x' }\n" +
+        "'create-requesthandler' : { 'name' : '/dump1', registerPath :'/solr,/v2' , 'class':
'org.apache.solr.handler.DumpRequestHandler', 'useParams':'x' }\n" +
         "}";
 
     TestSolrConfigHandler.runConfigCommand(harness, "/config?wt=json", payload);
@@ -794,7 +794,7 @@ public class TestSolrConfigHandler extends RestTestBase {
         "org.apache.solr.handler.DumpRequestHandler",
         10);
     RESTfulServerProvider oldProvider = restTestHarness.getServerProvider();
-    restTestHarness.setServerProvider(() -> jetty.getBaseUrl().toString() + "/v2/cores/"
+ DEFAULT_TEST_CORENAME);
+    restTestHarness.setServerProvider(() -> jetty.getBaseUrl().toString() + "/____v2/cores/"
+ DEFAULT_TEST_CORENAME);
 
     Map rsp = TestSolrConfigHandler.testForResponseElement(
         harness,

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0fb386a8/solr/core/src/test/org/apache/solr/handler/TestReqParamsAPI.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/TestReqParamsAPI.java b/solr/core/src/test/org/apache/solr/handler/TestReqParamsAPI.java
index 3912011..de4a27a 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestReqParamsAPI.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestReqParamsAPI.java
@@ -50,6 +50,9 @@ public class TestReqParamsAPI extends SolrCloudTestCase {
   private void setupHarnesses() {
     for (final JettySolrRunner jettySolrRunner : cluster.getJettySolrRunners()) {
       RestTestHarness harness = new RestTestHarness(() -> jettySolrRunner.getBaseUrl().toString()
+ "/" + COLL_NAME);
+      if (true) {
+        harness.setServerProvider(() -> jettySolrRunner.getBaseUrl().toString() + "/____v2/c/"
+ COLL_NAME);
+      }
       restTestHarnesses.add(harness);
     }
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0fb386a8/solr/core/src/test/org/apache/solr/handler/V2ApiIntegrationTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/V2ApiIntegrationTest.java b/solr/core/src/test/org/apache/solr/handler/V2ApiIntegrationTest.java
index 1af5d93..4eb3de2 100644
--- a/solr/core/src/test/org/apache/solr/handler/V2ApiIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/V2ApiIntegrationTest.java
@@ -86,10 +86,10 @@ public class V2ApiIntegrationTest extends SolrCloudTestCase {
   private void testApis() throws Exception {
     RestTestHarness restHarness = restTestHarnesses.get(0);
     ServerProvider serverProvider = (ServerProvider) restHarness.getServerProvider();
-    serverProvider.baseurl = serverProvider.jettySolrRunner.getBaseUrl()+"/v2/c/"+ COLL_NAME;
+    serverProvider.baseurl = serverProvider.jettySolrRunner.getBaseUrl()+"/____v2/c/"+ COLL_NAME;
     Map result = TestSolrConfigHandler.getRespMap("/get/_introspect", restHarness);
     assertEquals("/c/collection1/get", Utils.getObjectByPath(result, true, "/spec[0]/url/paths[0]"));
-    serverProvider.baseurl = serverProvider.jettySolrRunner.getBaseUrl()+"/v2/collections/"+
COLL_NAME;
+    serverProvider.baseurl = serverProvider.jettySolrRunner.getBaseUrl()+"/____v2/collections/"+
COLL_NAME;
     result = TestSolrConfigHandler.getRespMap("/get/_introspect", restHarness);
     assertEquals("/collections/collection1/get", Utils.getObjectByPath(result, true, "/spec[0]/url/paths[0]"));
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0fb386a8/solr/core/src/test/org/apache/solr/rest/schema/TestBulkSchemaAPI.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/rest/schema/TestBulkSchemaAPI.java b/solr/core/src/test/org/apache/solr/rest/schema/TestBulkSchemaAPI.java
index ea8fd7b..e2dc2bf 100644
--- a/solr/core/src/test/org/apache/solr/rest/schema/TestBulkSchemaAPI.java
+++ b/solr/core/src/test/org/apache/solr/rest/schema/TestBulkSchemaAPI.java
@@ -69,7 +69,7 @@ public class TestBulkSchemaAPI extends RestTestBase {
       restTestHarness.setServerProvider(new RESTfulServerProvider() {
         @Override
         public String getBaseURL() {
-          return jetty.getBaseUrl().toString() + "/v2/cores/" + DEFAULT_TEST_CORENAME;
+          return jetty.getBaseUrl().toString() + "/____v2/cores/" + DEFAULT_TEST_CORENAME;
         }
       });
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0fb386a8/solr/core/src/test/org/apache/solr/security/BasicAuthIntegrationTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/security/BasicAuthIntegrationTest.java b/solr/core/src/test/org/apache/solr/security/BasicAuthIntegrationTest.java
index 397f4e8..5231dd8 100644
--- a/solr/core/src/test/org/apache/solr/security/BasicAuthIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/security/BasicAuthIntegrationTest.java
@@ -86,8 +86,8 @@ public class BasicAuthIntegrationTest extends SolrCloudTestCase {
     String authcPrefix = "/admin/authentication";
     String authzPrefix = "/admin/authorization";
     if(random().nextBoolean()){
-      authcPrefix = "/v2/cluster/security/authentication";
-      authzPrefix = "/v2/cluster/security/authorization";
+      authcPrefix = "/____v2/cluster/security/authentication";
+      authzPrefix = "/____v2/cluster/security/authorization";
     }
 
     NamedList<Object> rsp;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0fb386a8/solr/server/etc/jetty.xml
----------------------------------------------------------------------
diff --git a/solr/server/etc/jetty.xml b/solr/server/etc/jetty.xml
index 8cb8223..b512c51 100644
--- a/solr/server/etc/jetty.xml
+++ b/solr/server/etc/jetty.xml
@@ -97,35 +97,43 @@
           </New>
         </Arg>
       </Call>
+       <Call name="addRule">
+         <Arg>
+           <New class="org.eclipse.jetty.rewrite.handler.RewritePatternRule">
+             <Set name="pattern">/v2/*</Set>
+             <Set name="replacement">/solr/____v2</Set>
+           </New>
+         </Arg>
+       </Call>
+       <Set name="handler">
+         <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
+           <Set name="handlers">
+             <Array type="org.eclipse.jetty.server.Handler">
+               <Item>
+                 <New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
+               </Item>
+               <Item>
+                 <New id="InstrumentedHandler" class="com.codahale.metrics.jetty9.InstrumentedHandler">
+                   <Arg><Ref refid="solrJettyMetricRegistry"/></Arg>
+                   <Set name="handler">
+                     <New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/>
+                   </Set>
+                 </New>
+               </Item>
+               <Item>
+                 <New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler"/>
+               </Item>
+             </Array>
+           </Set>
+         </New>
+       </Set>
      </New>
 
     <!-- =========================================================== -->
     <!-- Set handler Collection Structure                            -->
     <!-- =========================================================== -->
     <Set name="handler">
-      <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
-        <Set name="handlers">
-         <Array type="org.eclipse.jetty.server.Handler">
-           <Item>
-             <Ref id="RewriteHandler"/>
-           </Item>
-           <Item>
-             <New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
-           </Item>
-           <Item>
-             <New id="InstrumentedHandler" class="com.codahale.metrics.jetty9.InstrumentedHandler">
-               <Arg><Ref refid="solrJettyMetricRegistry"/></Arg>
-               <Set name="handler">
-                 <New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/>
-               </Set>
-             </New>
-           </Item>
-           <Item>
-             <New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler"/>
-           </Item>
-         </Array>
-        </Set>
-      </New>
+      <Ref id="RewriteHandler"/>
     </Set>
     
     <!-- =========================================================== -->

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0fb386a8/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml b/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
index a9ddb25..3ff89c0 100644
--- a/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
+++ b/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
@@ -850,7 +850,7 @@
     </requestHandler>
 
   <!-- A request handler that returns indented JSON by default -->
-  <requestHandler name="/query" class="solr.SearchHandler" registerPath="/,/v2">
+  <requestHandler name="/query" class="solr.SearchHandler" registerPath="/solr,/v2">
      <lst name="defaults">
        <str name="echoParams">explicit</str>
        <str name="wt">json</str>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0fb386a8/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
index 3147d4e..d3938c8 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
@@ -1047,8 +1047,8 @@ public class CloudSolrClient extends SolrClient {
       CONFIGSETS_HANDLER_PATH,
       AUTHC_PATH,
       AUTHZ_PATH,
-      "/v2/cluster/security/authentication",
-      "/v2/cluster/security/authorization"
+      "/____v2/cluster/security/authentication",
+      "/____v2/cluster/security/authorization"
       ));
 
   /**

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0fb386a8/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleJettyTest.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleJettyTest.java
b/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleJettyTest.java
index b7ac7de..cb4ba50 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleJettyTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleJettyTest.java
@@ -98,7 +98,7 @@ public class SolrExampleJettyTest extends SolrExampleTests {
   private String getUri(HttpSolrClient client) {
     String baseURL = client.getBaseURL();
     return random().nextBoolean() ?
-        baseURL.replace("/collection1", "/v2/cores/collection1/update") :
+        baseURL.replace("/collection1", "/____v2/cores/collection1/update") :
         baseURL + "/update/json/docs";
   }
 }


Mime
View raw message