-
Notifications
You must be signed in to change notification settings - Fork 692
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'apache/main' into feature/SOLR-17602/pe…
…r-module-dependency-locking
- Loading branch information
Showing
63 changed files
with
2,210 additions
and
1,493 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
solr/api/src/java/org/apache/solr/client/api/endpoint/CollectionStatusApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* | ||
* 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.client.api.endpoint; | ||
|
||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.Parameter; | ||
import jakarta.ws.rs.GET; | ||
import jakarta.ws.rs.Path; | ||
import jakarta.ws.rs.PathParam; | ||
import jakarta.ws.rs.QueryParam; | ||
import org.apache.solr.client.api.model.CollectionStatusResponse; | ||
|
||
/** | ||
* V2 API definition for fetching collection metadata | ||
* | ||
* <p>This API (GET /v2/collections/collectionName) is analogous to the v1 | ||
* /admin/collections?action=COLSTATUS command. | ||
*/ | ||
@Path("/collections/{collectionName}") | ||
public interface CollectionStatusApi { | ||
|
||
// TODO Query parameters currently match those offered by the v1 | ||
// /admin/collections?action=COLSTATUS. Should param names be updated/clarified? | ||
@GET | ||
@Operation( | ||
summary = "Fetches metadata about the specified collection", | ||
tags = {"collections"}) | ||
CollectionStatusResponse getCollectionStatus( | ||
@Parameter(description = "The name of the collection return metadata for", required = true) | ||
@PathParam("collectionName") | ||
String collectionName, | ||
@Parameter(description = SegmentsApi.CORE_INFO_PARAM_DESC) @QueryParam("coreInfo") | ||
Boolean coreInfo, | ||
@Parameter( | ||
description = | ||
"Boolean flag to include metadata and statistics about the segments used by each shard leader. Implicitly set to true by 'fieldInfo' and 'sizeInfo'") | ||
@QueryParam("segments") | ||
Boolean segments, | ||
@Parameter( | ||
description = | ||
SegmentsApi.FIELD_INFO_PARAM_DESC | ||
+ " Implicitly sets the 'segments' flag to 'true'") | ||
@QueryParam("fieldInfo") | ||
Boolean fieldInfo, | ||
@Parameter(description = SegmentsApi.RAW_SIZE_PARAM_DESC) @QueryParam("rawSize") | ||
Boolean rawSize, | ||
@Parameter(description = SegmentsApi.RAW_SIZE_SUMMARY_DESC) @QueryParam("rawSizeSummary") | ||
Boolean rawSizeSummary, | ||
@Parameter(description = SegmentsApi.RAW_SIZE_DETAILS_DESC) @QueryParam("rawSizeDetails") | ||
Boolean rawSizeDetails, | ||
@Parameter(description = SegmentsApi.RAW_SIZE_SAMPLING_PERCENT_DESC) | ||
@QueryParam("rawSizeSamplingPercent") | ||
Float rawSizeSamplingPercent, | ||
@Parameter( | ||
description = | ||
SegmentsApi.SIZE_INFO_PARAM_DESC | ||
+ ". Implicitly sets the 'segment' flag to 'true'") | ||
@QueryParam("sizeInfo") | ||
Boolean sizeInfo) | ||
throws Exception; | ||
} |
100 changes: 100 additions & 0 deletions
100
solr/api/src/java/org/apache/solr/client/api/endpoint/ConfigsetsApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
/* | ||
* 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.client.api.endpoint; | ||
|
||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.parameters.RequestBody; | ||
import jakarta.ws.rs.DELETE; | ||
import jakarta.ws.rs.GET; | ||
import jakarta.ws.rs.POST; | ||
import jakarta.ws.rs.PUT; | ||
import jakarta.ws.rs.Path; | ||
import jakarta.ws.rs.PathParam; | ||
import jakarta.ws.rs.QueryParam; | ||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import org.apache.solr.client.api.model.CloneConfigsetRequestBody; | ||
import org.apache.solr.client.api.model.ListConfigsetsResponse; | ||
import org.apache.solr.client.api.model.SolrJerseyResponse; | ||
|
||
public interface ConfigsetsApi { | ||
|
||
/** V2 API definition for listing the configsets available to this SolrCloud cluster. */ | ||
@Path("/configsets") | ||
interface List { | ||
@GET | ||
@Operation( | ||
summary = "List the configsets available to Solr.", | ||
tags = {"configsets"}) | ||
ListConfigsetsResponse listConfigSet() throws Exception; | ||
} | ||
|
||
/** | ||
* V2 API definition for creating a (possibly slightly modified) copy of an existing configset | ||
* | ||
* <p>Equivalent to the existing v1 API /admin/configs?action=CREATE | ||
*/ | ||
@Path("/configsets") | ||
interface Clone { | ||
@POST | ||
@Operation( | ||
summary = "Create a new configset modeled on an existing one.", | ||
tags = {"configsets"}) | ||
SolrJerseyResponse cloneExistingConfigSet(CloneConfigsetRequestBody requestBody) | ||
throws Exception; | ||
} | ||
|
||
/** | ||
* V2 API definition for deleting an existing configset. | ||
* | ||
* <p>Equivalent to the existing v1 API /admin/configs?action=DELETE | ||
*/ | ||
@Path("/configsets/{configSetName}") | ||
interface Delete { | ||
@DELETE | ||
@Operation(summary = "Delete an existing configset.", tags = "configsets") | ||
SolrJerseyResponse deleteConfigSet(@PathParam("configSetName") String configSetName) | ||
throws Exception; | ||
} | ||
|
||
/** | ||
* V2 API definitions for uploading a configset, in whole or part. | ||
* | ||
* <p>Equivalent to the existing v1 API /admin/configs?action=UPLOAD | ||
*/ | ||
@Path("/configsets/{configSetName}") | ||
interface Upload { | ||
@PUT | ||
@Operation(summary = "Create a new configset.", tags = "configsets") | ||
SolrJerseyResponse uploadConfigSet( | ||
@PathParam("configSetName") String configSetName, | ||
@QueryParam("overwrite") Boolean overwrite, | ||
@QueryParam("cleanup") Boolean cleanup, | ||
@RequestBody(required = true) InputStream requestBody) | ||
throws IOException; | ||
|
||
@PUT | ||
@Path("{filePath:.+}") | ||
SolrJerseyResponse uploadConfigSetFile( | ||
@PathParam("configSetName") String configSetName, | ||
@PathParam("filePath") String filePath, | ||
@QueryParam("overwrite") Boolean overwrite, | ||
@QueryParam("cleanup") Boolean cleanup, | ||
@RequestBody(required = true) InputStream requestBody) | ||
throws IOException; | ||
} | ||
} |
32 changes: 0 additions & 32 deletions
32
solr/api/src/java/org/apache/solr/client/api/endpoint/ListConfigsetsApi.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.