gnodet-bot commented on code in PR #31192:
URL: https://github.com/apache/camel/pull/31192#discussion_r4758019158
##########
components/camel-elasticsearch-rest-client/src/main/java/org/apache/camel/component/elasticsearch/rest/client/ElasticsearchRestClientEndpoint.java:
##########
@@ -88,41 +89,72 @@
+ " GET_BY_ID of a missing id
fails with 404 rather than giving null"))
public class ElasticsearchRestClientEndpoint extends DefaultEndpoint
implements EndpointServiceLocation {
- @UriPath
+ @UriPath(description = "The name of the Elasticsearch cluster. It only
names the endpoint: the hostAddressesList option"
+ + " or the restClient option sets the nodes to
connect to.")
@Metadata(required = true)
private String clusterName;
- @UriParam
+ @UriParam(description = "The operation that the producer performs. The
CamelElasticsearchOperation header replaces this"
+ + " option. Either the option or the header is
required.")
ElasticsearchRestClientOperation operation;
- @UriParam(label = "advanced")
+ @UriParam(label = "advanced",
+ description = "The org.elasticsearch.client.RestClient to use,
instead of a client that the producer creates."
+ + " When set, hostAddressesList and the timeout,
security and sniffer options are not used, and"
+ + " the producer does not close the client when it
stops.")
@Metadata(autowired = true)
RestClient restClient;
- @UriParam
+ @UriParam(description = "The name of the index that the operation acts on.
When not set, the"
+ + " CamelElasticsearchIndexName header is used.
Either the option or the header is required.")
String indexName;
- @UriParam
+ @UriParam(description = "The comma-separated list of the nodes to connect
to, each as [scheme://]host[:port], for"
+ + " example http://es1:9200,http://es2:9200. The
scheme is http if not set, and the port is the"
+ + " default port of the scheme (80 for http, 443
for https) if not set. Required unless the"
+ + " restClient option is set.")
String hostAddressesList;
- @UriParam(defaultValue = "" +
ElasticSearchRestClientConstant.SOCKET_CONNECTION_TIMEOUT)
+ @UriParam(defaultValue = "" +
ElasticSearchRestClientConstant.SOCKET_CONNECTION_TIMEOUT,
+ description = "The connect timeout in milliseconds: the longest
time that the client waits to establish the"
+ + " connection to a node. Zero means no timeout.
Not used when the restClient option is set.")
private int connectionTimeout =
ElasticSearchRestClientConstant.SOCKET_CONNECTION_TIMEOUT;
- @UriParam(defaultValue = "" +
ElasticSearchRestClientConstant.SOCKET_CONNECTION_TIMEOUT)
+ @UriParam(defaultValue = "" +
ElasticSearchRestClientConstant.SOCKET_CONNECTION_TIMEOUT,
+ description = "The socket timeout in milliseconds: the longest
time that the client waits for data from a"
+ + " node before the request fails. Zero means no
timeout. Not used when the restClient option is"
+ + " set.")
private int socketTimeout =
ElasticSearchRestClientConstant.SOCKET_CONNECTION_TIMEOUT;
- @UriParam(label = "security", security = "secret")
+ @UriParam(label = "security", security = "secret",
+ description = "The user name for basic authentication. Used only
when password is also set.")
private String user;
- @UriParam(label = "security", security = "secret")
+ @UriParam(label = "security", security = "secret",
+ description = "The password for basic authentication. Used only
when user is also set.")
private String password;
- @UriParam(label = "security")
+ @UriParam(label = "security",
+ description = "The CA certificate, in X.509 format, that the
client trusts for HTTPS instead of the default"
+ + " trust store of the JVM. It is loaded from the
classpath by default, or with the prefix"
+ + " classpath:, file: or http:.
sslContextParameters takes precedence.")
@Metadata(supportFileReference = true)
private String certificatePath;
- @UriParam(label = "security")
+ @UriParam(label = "security",
+ description = "To configure security using SSLContextParameters,
which sets the protocols, cipher suites,"
+ + " named groups and signature schemes of the
HTTPS connection. It takes precedence over"
+ + " certificatePath.")
private SSLContextParameters sslContextParameters;
- @UriParam(label = "advanced")
+ @UriParam(label = "advanced",
+ description = "Whether to start the Sniffer of the Elasticsearch
REST client, which reads the nodes of the"
+ + " cluster from its Nodes Info API at start and
then at the snifferInterval, and updates the"
+ + " nodes that the client sends requests to. Not
used when the restClient option is set.")
private boolean enableSniffer;
- @UriParam(label = "advanced", defaultValue = "" +
ElasticSearchRestClientConstant.SNIFFER_INTERVAL_AND_FAILURE_DELAY)
+ @UriParam(label = "advanced", defaultValue = "" +
ElasticSearchRestClientConstant.SNIFFER_INTERVAL_AND_FAILURE_DELAY,
+ description = "The interval in milliseconds between two reads of
the nodes of the cluster, when"
+ + " enableSniffer is set. Must be greater than 0.")
private int snifferInterval =
ElasticSearchRestClientConstant.SNIFFER_INTERVAL_AND_FAILURE_DELAY;
- @UriParam(label = "advanced", defaultValue = "" +
ElasticSearchRestClientConstant.SNIFFER_INTERVAL_AND_FAILURE_DELAY)
+ @UriParam(label = "advanced", defaultValue = "" +
ElasticSearchRestClientConstant.SNIFFER_INTERVAL_AND_FAILURE_DELAY,
+ description = "The delay in milliseconds of the read of the
nodes that the Sniffer schedules after a failed"
+ + " request, when enableSniffer is set. Must be
greater than 0. It has no effect at the moment:"
+ + " the client is created without the listener
that reports failed requests to the Sniffer, so"
+ + " the Sniffer reads the nodes only at the
snifferInterval.")
Review Comment:
💬 **Non-blocking nit (STE):** This sentence runs to 31 words (above the
25-word STE guideline for reference docs). Consider splitting at the colon:
```suggestion
description = "The delay in milliseconds of the read of the
nodes that the Sniffer schedules after a failed" +
" request, when enableSniffer is set. Must be
greater than 0." +
" Currently has no effect: the client is created
without the failed-request listener, so" +
" the Sniffer reads the nodes only at
snifferInterval.",
```
Feel free to disregard — the current text is unambiguous.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]