-
Notifications
You must be signed in to change notification settings - Fork 674
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into noSimpleMap
# Conflicts: # solr/solrj-zookeeper/src/java/org/apache/solr/common/LazySolrCluster.java
- Loading branch information
Showing
114 changed files
with
2,257 additions
and
1,125 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
32 changes: 32 additions & 0 deletions
32
solr/api/src/java/org/apache/solr/client/api/endpoint/CreateAliasApi.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,32 @@ | ||
/* | ||
* 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 jakarta.ws.rs.POST; | ||
import jakarta.ws.rs.Path; | ||
import org.apache.solr.client.api.model.CreateAliasRequestBody; | ||
import org.apache.solr.client.api.model.SolrJerseyResponse; | ||
|
||
@Path("/aliases") | ||
public interface CreateAliasApi { | ||
@POST | ||
@Operation( | ||
summary = "Create a traditional or 'routed' alias", | ||
tags = {"aliases"}) | ||
SolrJerseyResponse createAlias(CreateAliasRequestBody requestBody) throws Exception; | ||
} |
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
61 changes: 61 additions & 0 deletions
61
solr/api/src/java/org/apache/solr/client/api/endpoint/NodeLoggingApis.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,61 @@ | ||
/* | ||
* 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 jakarta.ws.rs.GET; | ||
import jakarta.ws.rs.PUT; | ||
import jakarta.ws.rs.Path; | ||
import jakarta.ws.rs.QueryParam; | ||
import java.util.List; | ||
import org.apache.solr.client.api.model.ListLevelsResponse; | ||
import org.apache.solr.client.api.model.LogLevelChange; | ||
import org.apache.solr.client.api.model.LogMessagesResponse; | ||
import org.apache.solr.client.api.model.LoggingResponse; | ||
import org.apache.solr.client.api.model.SetThresholdRequestBody; | ||
|
||
@Path("/node/logging") | ||
public interface NodeLoggingApis { | ||
|
||
@GET | ||
@Path("/levels") | ||
@Operation( | ||
summary = "List all log-levels for the target node.", | ||
tags = {"logging"}) | ||
ListLevelsResponse listAllLoggersAndLevels(); | ||
|
||
@PUT | ||
@Path("/levels") | ||
@Operation( | ||
summary = "Set one or more logger levels on the target node.", | ||
tags = {"logging"}) | ||
LoggingResponse modifyLocalLogLevel(List<LogLevelChange> requestBody); | ||
|
||
@GET | ||
@Path("/messages") | ||
@Operation( | ||
summary = "Fetch recent log messages on the targeted node.", | ||
tags = {"logging"}) | ||
LogMessagesResponse fetchLocalLogMessages(@QueryParam("since") Long boundingTimeMillis); | ||
|
||
@PUT | ||
@Path("/messages/threshold") | ||
@Operation( | ||
summary = "Set a threshold level for the targeted node's log message watcher.", | ||
tags = {"logging"}) | ||
LoggingResponse setMessageThreshold(SetThresholdRequestBody requestBody); | ||
} |
50 changes: 50 additions & 0 deletions
50
solr/api/src/java/org/apache/solr/client/api/endpoint/ReplicationApis.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,50 @@ | ||
/* | ||
* 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.QueryParam; | ||
import java.io.IOException; | ||
import org.apache.solr.client.api.model.FileListResponse; | ||
import org.apache.solr.client.api.model.IndexVersionResponse; | ||
import org.apache.solr.client.api.util.CoreApiParameters; | ||
|
||
@Path("/cores/{coreName}/replication") | ||
public interface ReplicationApis { | ||
|
||
@GET | ||
@CoreApiParameters | ||
@Path("/indexversion") | ||
@Operation( | ||
summary = "Return the index version of the specified core.", | ||
tags = {"replication"}) | ||
IndexVersionResponse fetchIndexVersion() throws IOException; | ||
|
||
@GET | ||
@CoreApiParameters | ||
@Path("/files") | ||
@Operation( | ||
summary = "Return the list of index file that make up the specified core.", | ||
tags = {"replication"}) | ||
FileListResponse fetchFileList( | ||
@Parameter(description = "The generation number of the index", required = true) | ||
@QueryParam("generation") | ||
long gen); | ||
} |
27 changes: 27 additions & 0 deletions
27
solr/api/src/java/org/apache/solr/client/api/model/CategoryRoutedAliasProperties.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,27 @@ | ||
/* | ||
* 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.model; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class CategoryRoutedAliasProperties extends RoutedAliasProperties { | ||
@JsonProperty("maxCardinality") | ||
public Long maxCardinality; | ||
|
||
@JsonProperty("mustMatch") | ||
public String mustMatch; | ||
} |
42 changes: 42 additions & 0 deletions
42
solr/api/src/java/org/apache/solr/client/api/model/CreateAliasRequestBody.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,42 @@ | ||
/* | ||
* 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.model; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import java.util.List; | ||
|
||
public class CreateAliasRequestBody { | ||
@JsonProperty(required = true) | ||
public String name; | ||
|
||
@JsonProperty("collections") | ||
public List<String> collections; | ||
|
||
@JsonProperty("async") | ||
public String async; | ||
|
||
@JsonProperty("routers") | ||
public List<RoutedAliasProperties> routers; | ||
|
||
@Schema( | ||
description = | ||
"Parameters to be used for any collections created by this alias. Only used for 'routed' aliases", | ||
name = "collCreationParameters") | ||
@JsonProperty("create-collection") | ||
public CreateCollectionRequestBody collCreationParameters; | ||
} |
38 changes: 38 additions & 0 deletions
38
solr/api/src/java/org/apache/solr/client/api/model/FileListResponse.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,38 @@ | ||
/* | ||
* 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.model; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import java.util.List; | ||
|
||
/** Response body for the `GET /api/cores/coreName/replication/files` API */ | ||
public class FileListResponse extends SolrJerseyResponse { | ||
@JsonProperty("filelist") | ||
public List<FileMetaData> fileList; | ||
|
||
@JsonProperty("confFiles") | ||
public List<FileMetaData> confFiles; | ||
|
||
@JsonProperty("status") | ||
public String status; | ||
|
||
@JsonProperty("message") | ||
public String message; | ||
|
||
@JsonProperty("exception") | ||
public Exception exception; | ||
} |
Oops, something went wrong.