Skip to content

Commit

Permalink
Merge remote-tracking branch 'apache/main' into feature/SOLR-17602/pe…
Browse files Browse the repository at this point in the history
…r-module-dependency-locking
  • Loading branch information
malliaridis committed Jan 3, 2025
2 parents 9cf9d80 + b2d18ca commit 7128d69
Show file tree
Hide file tree
Showing 63 changed files with 2,210 additions and 1,493 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -438,13 +438,6 @@ private void error(Element element, String message) {
fullMessage.append("): ");
fullMessage.append(message);

if (Runtime.version().feature() == 11 && element.getKind() == ElementKind.PACKAGE) {
// Avoid JDK 11 bug:
// https://issues.apache.org/jira/browse/LUCENE-9747
// https://bugs.openjdk.java.net/browse/JDK-8224082
reporter.print(Diagnostic.Kind.ERROR, fullMessage.toString());
} else {
reporter.print(Diagnostic.Kind.ERROR, element, fullMessage.toString());
}
reporter.print(Diagnostic.Kind.ERROR, element, fullMessage.toString());
}
}
2 changes: 0 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ apply from: file('gradle/java/javac.gradle')
apply from: file('gradle/testing/defaults-tests.gradle')
apply from: file('gradle/testing/randomization.gradle')
apply from: file('gradle/testing/fail-on-no-tests.gradle')
apply from: file('gradle/testing/fail-on-unsupported-jdk.gradle')
apply from: file('gradle/testing/alternative-jdk-support.gradle')
apply from: file('gradle/java/jar-manifest.gradle')
apply from: file('gradle/testing/retry-test.gradle')
Expand Down Expand Up @@ -205,7 +204,6 @@ apply from: file('gradle/hacks/global-exclude-dependencies.gradle')
apply from: file('gradle/hacks/gradle-archives.gradle')

apply from: file('gradle/hacks/wipe-temp.gradle')
apply from: file('gradle/hacks/hashmapAssertions.gradle')
apply from: file('gradle/hacks/turbocharge-jvm-opts.gradle')
apply from: file('gradle/hacks/dummy-outputs.gradle')

Expand Down
33 changes: 0 additions & 33 deletions gradle/hacks/hashmapAssertions.gradle

This file was deleted.

32 changes: 0 additions & 32 deletions gradle/testing/fail-on-unsupported-jdk.gradle

This file was deleted.

20 changes: 7 additions & 13 deletions solr/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ Improvements

* SOLR-17516: `LBHttp2SolrClient` is now generic, adding support for `HttpJdkSolrClient`. (James Dyer)

* SOLR-17541: `LBHttp2SolrClient` now maintains a separate internal/delegate client per Solr Base URL. Both `LBHttp2SolrClient` and `CloudHttp2SolrClient`
always create and manage these internal clients. The ability for callers to provide a pre-built client is removed. Callers may specify the internal client
details by providing an instance of either `Http2SolrClient.Builder` or `HttpJdkSolrClient.Builder`. (James Dyer)

Optimizations
---------------------
* SOLR-17568: The CLI bin/solr export tool now contacts the appropriate nodes directly for data instead of proxying through one.
Expand Down Expand Up @@ -106,11 +102,6 @@ Deprecation Removals

* SOLR-17540: Removed the Hadoop Auth module, and thus Kerberos authentication and other exotic options. (Eric Pugh)

* SOLR-17541: Removed `CloudHttp2SolrClient.Builder#withHttpClient` in favor of `CloudHttp2SolrClient.Builder#withInternalClientBuilder`.
The constructor on `LBHttp2SolrClient.Builder` that took an instance of `HttpSolrClientBase` is updated to instead take an instance of
`HttpSolrClientBuilderBase`. Renamed `LBHttp2SolrClient.Builder#withListenerFactory` to `LBHttp2SolrClient.Builder#withListenerFactories`
(James Dyer)

Dependency Upgrades
---------------------
(No changes)
Expand Down Expand Up @@ -159,10 +150,13 @@ New Features

Improvements
---------------------
* SOLR-17541: Deprecate `CloudHttp2SolrClient.Builder#withHttpClient` in favor of
`CloudHttp2SolrClient.Builder#withInternalClientBuilder`.
Deprecate `LBHttp2SolrClient.Builder#withListenerFactory` in favor of
`LBHttp2SolrClient.Builder#withListenerFactories` (James Dyer)
* SOLR-15751: The v2 API now has parity with the v1 "COLSTATUS" and "segments" APIs, which can be used to fetch detailed information about
specific collections or cores. Collection information can be fetched by a call to `GET /api/collections/collectionName`, and core
information with a call to `GET /api/cores/coreName/segments`. (Jason Gerlowski)

* SOLR-16396: All v2 configset APIs have been moved to the slightly different path: `/api/configsets`, to better align with the design of
other v2 APIs. SolrJ now offers (experimental) SolrRequest implementations for all v2 configset APIs in
`org.apache.solr.client.solrj.request.ConfigsetsApi`. (Jason Gerlowski)

Optimizations
---------------------
Expand Down
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;
}
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;
}
}

This file was deleted.

Loading

0 comments on commit 7128d69

Please sign in to comment.