It's not a change in the source code though since it's a plugin. You simply do the following:

 * Implement the QueryHandler interface with new metrics.
 * Add the compiled jar to the CLASSPATH in cassandra.in.sh
 * In cassandra-env.sh, set -Dcassandra.custom_query_handler_class to
   your custom class, e.g. JVM_OPTS="$JVM_OPTS
   -Dcassandra.custom_query_handler_class=example.com.MyQueryHandler.

BR,
Simon

On 2018-02-28 11:21, Kyrylo Lebediev wrote:

Thanks, Horia!

Wouldn't like to introduce any changes in source code.


Any alternatives how to trace CL's used from C* side?  If not 'since startup', then at least online metrics will be fine.


Regards,

Kyrill

------------------------------------------------------------------------
*From:* Horia Mocioi <horia.moc...@ericsson.com>
*Sent:* Tuesday, February 27, 2018 7:38:23 PM
*To:* user@cassandra.apache.org
*Subject:* Re: JMX metrics for CL
Hello,

There are no such metrics that I am aware of.

One way you could do this is to have your own implementation of QueryHandler and your own metrics and filter the queries based on the CL and increment the according metric.

Then, in cassandra-env.sh you could specify to use your class using  -Dcassandra.custom_query_handler_class.

HTH,
Horia
On tis, 2018-02-27 at 08:26 +0000, Kyrylo Lebediev wrote:

Hello!


Is it possible to get counters  from C* side regarding CQL queries executed since startup for each CL?
For example:
CL ONE: NNN queries
CL QUORUM: MMM queries
etc

Regards,

Kyrill


Reply via email to