lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cpoersc...@apache.org
Subject [23/37] lucene-solr:jira/solr-8542-v2: SOLR-9132: Don't require indexInfo from corestatus over reloads
Date Mon, 31 Oct 2016 14:06:16 GMT
SOLR-9132: Don't require indexInfo from corestatus over reloads


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

Branch: refs/heads/jira/solr-8542-v2
Commit: 3b49705c43178fcd75dc85e56bcd2820cb35e166
Parents: cff2774
Author: Alan Woodward <romseygeek@apache.org>
Authored: Fri Oct 28 15:17:53 2016 +0100
Committer: Alan Woodward <romseygeek@apache.org>
Committed: Fri Oct 28 15:17:53 2016 +0100

----------------------------------------------------------------------
 .../apache/solr/cloud/CollectionsAPIDistributedZkTest.java    | 7 ++++---
 .../apache/solr/client/solrj/request/CoreAdminRequest.java    | 6 ++++++
 2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3b49705c/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java
b/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java
index c1ad2bd..7586f2a 100644
--- a/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java
@@ -49,6 +49,7 @@ import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.client.solrj.request.CollectionAdminRequest;
 import org.apache.solr.client.solrj.request.CoreAdminRequest;
 import org.apache.solr.client.solrj.request.CoreAdminRequest.Create;
+import org.apache.solr.client.solrj.request.CoreStatus;
 import org.apache.solr.client.solrj.request.QueryRequest;
 import org.apache.solr.client.solrj.request.UpdateRequest;
 import org.apache.solr.client.solrj.response.CollectionAdminResponse;
@@ -590,11 +591,11 @@ public class CollectionsAPIDistributedZkTest extends SolrCloudTestCase
{
       for (Slice shard : collectionState) {
         for (Replica replica : shard) {
           ZkCoreNodeProps coreProps = new ZkCoreNodeProps(replica);
-          CoreAdminResponse mcr;
+          CoreStatus coreStatus;
           try (HttpSolrClient server = getHttpSolrClient(coreProps.getBaseUrl())) {
-            mcr = CoreAdminRequest.getStatus(coreProps.getCoreName(), server);
+            coreStatus = CoreAdminRequest.getCoreStatus(coreProps.getCoreName(), false, server);
           }
-          long before = mcr.getStartTime(coreProps.getCoreName()).getTime();
+          long before = coreStatus.getCoreStartTime().getTime();
           urlToTime.put(coreProps.getCoreUrl(), before);
         }
       }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3b49705c/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java
b/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java
index 011844c..002bbc3 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java
@@ -620,8 +620,14 @@ public class CoreAdminRequest extends SolrRequest<CoreAdminResponse>
{
   }
 
   public static CoreStatus getCoreStatus(String coreName, SolrClient client) throws SolrServerException,
IOException {
+    return getCoreStatus(coreName, true, client);
+  }
+
+  public static CoreStatus getCoreStatus(String coreName, boolean getIndexInfo, SolrClient
client)
+      throws SolrServerException, IOException {
     CoreAdminRequest req = new CoreAdminRequest();
     req.setAction(CoreAdminAction.STATUS);
+    req.setIndexInfoNeeded(getIndexInfo);
     return new CoreStatus(req.process(client).getCoreStatus(coreName));
   }
 


Mime
View raw message