Skip to content

SOLR-16458: Migrate node properties API to JAX-RS - #4775

Open
iprithv wants to merge 2 commits into
apache:mainfrom
iprithv:node-properties-jaxrs
Open

SOLR-16458: Migrate node properties API to JAX-RS#4775
iprithv wants to merge 2 commits into
apache:mainfrom
iprithv:node-properties-jaxrs

Conversation

@iprithv

@iprithv iprithv commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Converts GET /api/node/properties from the homegrown @EndPoint wrapper to JAX-RS, matching the existing node health / logging / system APIs.

  • JAX-RS interface and typed NodePropertiesResponse in solr/api
  • GetNodeProperties owns redaction / collection logic
  • v1 /admin/info/properties delegates to that class; response key system.properties is unchanged
  • SolrJ generates NodeApi.GetNodeProperties
  • HTTP coverage via SolrJettyTestRule for named lookup, full list, and hidden-property redaction

https://issues.apache.org/jira/browse/SOLR-16458

@epugh epugh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great!

path, method, new ModifiableSolrParams(), v2RequestBody, mockCoresHandler);
}

private SolrParams captureConvertedPropertiesV1Params(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@epugh epugh self-assigned this Aug 20, 2026
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Aug 21, 2026
@iprithv
iprithv requested a review from epugh August 21, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cat:api documentation Improvements or additions to documentation tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants