Hi there,

is there a way if i can get metrics out of ignite-cassandra session? i tried
doing so by using a SessionListener in my cache configuration with below
implementation,

import com.datastax.driver.core.Session; import
org.apache.ignite.IgniteLogger; import
org.apache.ignite.cache.store.CacheStoreSession;
import org.apache.ignite.cache.store.CacheStoreSessionListener;
import org.apache.ignite.cache.store.cassandra.session.CassandraSessionImpl;
import org.apache.ignite.cache.store.cassandra.session.pool.SessionPool;
import org.apache.ignite.resources.LoggerResource;

public class IngCassandraMetricsPublisher implements
CacheStoreSessionListener {

    @LoggerResource
    IgniteLogger log;

    @Override
    public void onSessionStart(CacheStoreSession ses) {

    }

    @Override
    public void onSessionEnd(CacheStoreSession ses, boolean commit) {
        Session cassandra_store_connection =
SessionPool.get((CassandraSessionImpl)
ses.properties().get("CASSANDRA_STORE_CONNECTION"));
        com.datastax.driver.core.Metrics metrics =
cassandra_store_connection.getCluster().getMetrics();
        log.info("metrics client timeouts:" +
metrics.getErrorMetrics().getClientTimeouts().getCount());
    }
}


but this gives me null pointer exceptions as ses.properties() returns 0
count. I tried using DataSource to get CassandraSession But I am stuck at
point where i need to extract "*com.datastax.driver.core.Session*". Could
any one help?

regards,
Rajesh




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to