SOLR-16458: Migrate node properties API to JAX-RS - #4775
Conversation
epugh
left a comment
There was a problem hiding this comment.
one qeustion about how we get a single property format.. I think we are getting away in the v2 api from a name=myproperty parameter and using a path to be more restful? Also, do we need a Ref Guide update? That often get's missed.
| tags = {"node"}) | ||
| NodePropertiesResponse getNodeProperties( | ||
| @Parameter(description = "Optional name of a single system property to return.") | ||
| @QueryParam("name") |
There was a problem hiding this comment.
Should this be a query param or a path? /node/properties makes sense for listing. Should it be /node/properties/my.special.property ? Versus /node/properties?name=my.special.property? To be restful>
There was a problem hiding this comment.
yes, other v2 property APIs already put the name in the path (/cluster/properties/{propertyName}, /collections/{coll}/properties/{propName}), and SOLR-15781 is specifically about making v2 more REST-ful.
switched the v2 single-property form to GET /api/node/properties/{propertyName}. dotted JRE names like java.version are a single path segment, so they work the same way as the other property APIs. :)
also added a Ref Guide note on implicit-requesthandlers (and a pointer from the Java Properties screen) covering list vs single-property and v1 vs v2.
|
|
||
| @Schema(description = "JRE system properties for the Solr node. Secret values are redacted.") | ||
| @JsonProperty(SYSTEM_PROPERTIES) | ||
| public Map<String, String> systemProperties; |
There was a problem hiding this comment.
is it really as simple as a string/string? Great.
| import org.apache.solr.security.AuthorizationContext; | ||
|
|
||
| /** | ||
| * v1 implementation of {@code GET /admin/info/properties}. Business logic lives in {@link |
| path, method, new ModifiableSolrParams(), v2RequestBody, mockCoresHandler); | ||
| } | ||
|
|
||
| private SolrParams captureConvertedPropertiesV1Params( |
Converts
GET /api/node/propertiesfrom the homegrown@EndPointwrapper to JAX-RS, matching the existing node health / logging / system APIs.NodePropertiesResponseinsolr/apiGetNodePropertiesowns redaction / collection logic/admin/info/propertiesdelegates to that class; response keysystem.propertiesis unchangedNodeApi.GetNodePropertiesSolrJettyTestRulefor named lookup, full list, and hidden-property redactionhttps://issues.apache.org/jira/browse/SOLR-16458