[
https://issues.apache.org/jira/browse/CASSANDRASC-17?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17089934#comment-17089934
]
Jon Haddad commented on CASSANDRASC-17:
---------------------------------------
I think I have the client side of things figured out.
I generated the client swagger libraries using the following and took at look
at the source:
{noformat}
swagger-codegen generate -i api.yaml -l java -o ~/swagger-client
{noformat}
Swagger is a little weird in that it seems to originally be designed to work
with a single endpoint, not a system like the sidecar where you may have
hundreds of servers. If you don't specify a top level {{servers}} block in the
api configuration you end up with a client that doesn't know where to make
requests. When you create your client, I believe it has to look something like
this:
{code}
ApiClient apiClient = new ApiClient().setBasePath("http://192.168.1.1/node/1");
VisibilityApi api = new VisibilityApi(apiClient);
{code}
For sanity's sake you'd end up providing one VisibilityApi per Cassandra node.
I have to do a little more work to verify this and be certain, as well as
figure out how the server would be impacted.
> Ensure sidecar can control multiple Cassandra instances
> -------------------------------------------------------
>
> Key: CASSANDRASC-17
> URL: https://issues.apache.org/jira/browse/CASSANDRASC-17
> Project: Sidecar for Apache Cassandra
> Issue Type: Improvement
> Components: Configuration
> Reporter: Jon Haddad
> Priority: Normal
>
> Since we can run multiple hosts per node, we should allow a single sidecar
> process to control multiple Cassandra nodes.
> I am not sure if we should encode the id of the node in the URL or as a
> parameter that would have to be present in every request if using > 1 node.
> I lean towards the latter - meaning it’s a slight inconvenience for a very
> small group, rather than messing with the URL scheme for everyone else. I
> don’t hold this opinion very strongly though. I’d like to discuss before
> doing any work here.
> Thoughts?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]