andyvuong commented on a change in pull request #1687:
URL: https://github.com/apache/lucene-solr/pull/1687#discussion_r459012987



##########
File path: 
solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java
##########
@@ -863,13 +863,23 @@ public SolrParams getParams() {
   }
 
   /**
-   * Return a SolrRequest for low-level detailed status of the collection.
+   * Return a SolrRequest for low-level detailed status of the specified 
collection. 
+   * @param collection the collection to get the status of.
    */
   public static ColStatus collectionStatus(String collection) {
+    checkNotNull(CoreAdminParams.COLLECTION, collection);
     return new ColStatus(collection);
   }
+  
+  /**
+   * Return a SolrRequest for low-level detailed status of all collections on 
the cluster.
+   */
+  public static ColStatus collectionStatuses() {
+    return new ColStatus();
+  }
 
-  public static class ColStatus extends AsyncCollectionSpecificAdminRequest {

Review comment:
       AsyncCollectionSpecificAdminRequest enforces a non-null collection name 
passed in which doesn't work if the solrj colstatus interface's intention is to 
allow either one collection return or all collections returned as documented in 
the collection api doc. If no collection = null, i.e. empty, then 
collectionshandler will treat it as returning all collections staying 
consistent with the documented api.

##########
File path: 
solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
##########
@@ -517,10 +517,7 @@ private static void addStatusToResponse(NamedList<Object> 
results, RequestStatus
           ColStatus.RAW_SIZE_DETAILS_PROP,
           ColStatus.RAW_SIZE_SAMPLING_PERCENT_PROP,
           ColStatus.SIZE_INFO_PROP);
-      // make sure we can get the name if there's "name" but not "collection"
-      if (props.containsKey(CoreAdminParams.NAME) && 
!props.containsKey(COLLECTION_PROP)) {

Review comment:
       Removed this because it's not documented in the API anyway and the 
CoreAdminParams.NAME isn't copied anyway.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to