Skip to content

Commit 61c029c

Browse files
committed
SPARKC-642 Cleans up unused parameter conf in method dataCenterNodes
1 parent e53e484 commit 61c029c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

connector/src/main/scala/com/datastax/spark/connector/cql/CassandraConnector.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class CassandraConnector(val conf: CassandraConnectorConf)
6565
// wrapped in a session, so we get full lists of hosts,
6666
// not only those explicitly passed in the conf
6767
withSessionDo { session =>
68-
dataCenterNodes(_config, session)
68+
dataCenterNodes(session)
6969
}
7070

7171
private[connector] def hostAddresses: Set[InetAddress] = hosts.map(_.getAddress)
@@ -181,7 +181,7 @@ object CassandraConnector extends Logging {
181181
}
182182

183183
// 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] = {
185185
val allNodes = session.getMetadata.getNodes.asScala.values.toSet
186186
val nodes = allNodes
187187
.filter(_.getDistance != NodeDistance.IGNORED)
@@ -197,7 +197,7 @@ object CassandraConnector extends Logging {
197197
private def alternativeConnectionConfigs(conf: CassandraConnectorConf, session: CqlSession): Set[CassandraConnectorConf] = {
198198
conf.contactInfo match {
199199
case ipConf: IpBasedContactInfo =>
200-
val nodes = dataCenterNodes(conf, session)
200+
val nodes = dataCenterNodes(session)
201201
nodes.map(n => conf.copy(contactInfo = ipConf.copy(hosts = Set(n)))) + conf.copy(contactInfo = ipConf.copy(hosts = nodes))
202202
case _ => Set.empty
203203
}

0 commit comments

Comments
 (0)