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 of SparkEnv so there can be at most a single
active instance of CassandraConnectorSource. The active instance is assigned to
CassandraConnectorSource._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.
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.