@@ -65,7 +65,7 @@ class CassandraConnector(val conf: CassandraConnectorConf)
65
65
// wrapped in a session, so we get full lists of hosts,
66
66
// not only those explicitly passed in the conf
67
67
withSessionDo { session =>
68
- dataCenterNodes(_config, session)
68
+ dataCenterNodes(session)
69
69
}
70
70
71
71
private [connector] def hostAddresses : Set [InetAddress ] = hosts.map(_.getAddress)
@@ -181,7 +181,7 @@ object CassandraConnector extends Logging {
181
181
}
182
182
183
183
// LocalNodeFirstLoadBalancingPolicy assigns LOCAL or REMOTE (i.e. non-IGNORED) distance to local DC nodes
184
- private def dataCenterNodes (conf : CassandraConnectorConf , session : CqlSession ): Set [InetSocketAddress ] = {
184
+ private def dataCenterNodes (session : CqlSession ): Set [InetSocketAddress ] = {
185
185
val allNodes = session.getMetadata.getNodes.asScala.values.toSet
186
186
val nodes = allNodes
187
187
.filter(_.getDistance != NodeDistance .IGNORED )
@@ -197,7 +197,7 @@ object CassandraConnector extends Logging {
197
197
private def alternativeConnectionConfigs (conf : CassandraConnectorConf , session : CqlSession ): Set [CassandraConnectorConf ] = {
198
198
conf.contactInfo match {
199
199
case ipConf : IpBasedContactInfo =>
200
- val nodes = dataCenterNodes(conf, session)
200
+ val nodes = dataCenterNodes(session)
201
201
nodes.map(n => conf.copy(contactInfo = ipConf.copy(hosts = Set (n)))) + conf.copy(contactInfo = ipConf.copy(hosts = nodes))
202
202
case _ => Set .empty
203
203
}
0 commit comments