skoppu22 commented on code in PR #152:
URL: https://github.com/apache/cassandra-sidecar/pull/152#discussion_r1869921275
##########
client-common/src/main/java/org/apache/cassandra/sidecar/common/ApiEndpointsV1.java:
##########
@@ -118,6 +118,11 @@ public final class ApiEndpointsV1
public static final String CONNECTED_CLIENT_STATS_ROUTE = API_V1 +
CASSANDRA + "/stats/connected-clients";
+ // Endpoint to retrieve sstable's preemptiveOpenInterval value.
+ // Value returned is in MB, may return negative value when disabled
+ private static final String SSTABLE = "/sstable";
+ public static final String SSTABLE_PREEMPTIVE_OPEN_INTERVAL_ROUTE = API_V1
+ CASSANDRA + SSTABLE +
Review Comment:
- We want to make endpoint generic, so underlying changes to C* shouldn't
impact the endpoint usage for the end user, for example C* 6.0 returning value
in different unit, while older versions continue to return the value in MB, the
same endpoint should work regardless of the running c* version. Hence not
including MB in the endpoint name. Whereas JMX operation name need to match
exactly the JMX endpoint we are invoking. The same with passing option param
like unit=MB, better we avoid supporting new unit param in the endpoint
whenever C* changes for different versions.
- In the response we need to somehow tell the end user that value returned
is in in MB. I preferred the name SSTablePreemptiveOpenIntervalInMB as it
matches the JMX operation currently the end users are calling. Your suggestion
of separating the unit into another field sounds good, but that may complicate
callers's code, as they need to parse unit as a string and convert value into
those units accordingly. C* latest code changed this yaml param to for example
"60MiB", let me see which one is simpler for the calling code "60MiB" or {60,
"MiB"} and will get back to you
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]