gerlowskija commented on code in PR #4154: URL: https://github.com/apache/solr/pull/4154#discussion_r2867923548
########## solr/core/src/java/org/apache/solr/handler/admin/api/ListClusterNodes.java: ########## @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.solr.handler.admin.api; + +import static org.apache.solr.security.PermissionNameProvider.Name.COLL_READ_PERM; + +import jakarta.inject.Inject; +import org.apache.solr.client.api.endpoint.ListClusterNodesApi; +import org.apache.solr.client.api.model.ListClusterNodesResponse; +import org.apache.solr.core.CoreContainer; +import org.apache.solr.jersey.PermissionName; +import org.apache.solr.request.SolrQueryRequest; +import org.apache.solr.response.SolrQueryResponse; + +/** + * V2 API for listing the live nodes in the SolrCloud cluster. + * + * <p>This API (GET /v2/cluster/nodes) is equivalent to the v1 CLUSTERSTATUS action filtered to Review Comment: > don't quite understand how what I have written overlaps with the existing V2 code that I found in org.apache.solr.handler.ClusterAPI My understanding is: 1. Long ago Noble or someone added an old-style "/api/nodes/cluster" implementation in ClusterAPI. 2. Both implementations, old and new, seem to be returning roughly the same information and be roughly equivalent. 3. Your new implementation uses the desired framework and auto-generates a SolrJ binding, so it's definitely worth keeping. 4. That means this PR should probably delete the "old" API definition (i.e. `ClusterAPI.getNodes()` ) > should this API return filtered data? I am now thinking that if this is the new /cluster/nodes api, then it should take in params like liveNodes or includeAll? Should this be /cluster/nodes/live and we also support /cluster/nodes which would return all? I'm not really sure what you mean by this. In SolrCloud, there's no real notion of "dead" nodes. Either you've registered yourself in ZK and you're a "live" part of the cluster, or you're not in the cluster at all. Right? Am I missing something? -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
