This class is a Source implementation for Cassandra Connector related Codahale metrics.
A trait that provides a method to update read metrics which are collected for connector related tasks.
A trait that provides a method to update read metrics which are collected for connector related tasks. The appropriate instance is created by the companion object.
Instances of this trait are not thread-safe. They do not need to because a single instance should be created for each Cassandra read task. This remains valid as long as Cassandra read tasks are single-threaded.
The base trait for metrics updaters implementations.
The base trait for metrics updaters implementations. The metrics updater is an object which provides
a unified way to update all the relevant metrics which are collected for the particular type of
activity. The connector provides InputMetricsUpdater
and OutputMetricsUpdater
which are aimed
to update all the read and write metrics respectively.
A trait that provides a method to update write metrics which are collected for connector related tasks.
A trait that provides a method to update write metrics which are collected for connector related tasks. The appropriate instance is created by the companion object.
Instances of OutputMetricsUpdater
are thread-safe, because the Cassandra write task implementation
is multi-threaded.
Timer mixin allows to measure the time of a task - or, in other words - the time from creating an
instance to calling com.codahale.metrics.Timer.Context.stop
method.
This class is a Source implementation for Cassandra Connector related Codahale metrics. It is automatically instantiated and registered by Spark metrics system if this source is specified in metrics configuration file.
Spark instantiates this class when
SparkEnv
is started. There can be only a single instance ofSparkEnv
so there can be at most a single active instance ofCassandraConnectorSource
. The active instance is assigned toCassandraConnectorSource._instance
so that it can be retrieved from anywhere by CassandraConnectorSource.instance method. We need this because we have to access the meters from the task execution.