I find myself in need of managing many different CouchBase clusters for which I need to, sometimes, allow users to make Analytics queries. Not all of these clusters have an analytics node, so I would like to be able to report to users if they are looking at an Analytics-able cluster beforehand. How can I proceed to obtain this information using Java SDK?
would provide this information, but I haven’t been able to find it out by myself. Also, it seems there’s little information about this topic on the Internet.
This seems a surprising omission from the SDK, but I found a way to get the information. Services such as analytics (a.k.a., “cbas”) run on the nodes, so you need to iterate over the nodes in the cluster. There may be a better way to do this, but this is what I found (as someone with limited experience with the Java SDK):