Skip to content

Commit e53e484

Browse files
committed
SPARKC-642 Cleans up an unused piece of code in repartitionByCassandraReplica
repartitionByCassandraReplica was instantiating an unused ReplicaLocator (it seems to be a legacy code copied from keyByCassandraReplica). repartitionByCassandraReplica uses a ReplicaPartitioner instead.
1 parent 9ab28e1 commit e53e484

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

connector/src/main/scala/com/datastax/spark/connector/RDDFunctions.scala

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -237,31 +237,6 @@ class RDDFunctions[T](rdd: RDD[T]) extends WritableToCassandra[T] with Serializa
237237
currentType: ClassTag[T],
238238
rwf: RowWriterFactory[T]): CassandraPartitionedRDD[T] = {
239239

240-
val replicaLocator = ReplicaLocator[T](connector, keyspaceName, tableName, partitionKeyMapper)
241-
rdd.repartitionByCassandraReplica(
242-
replicaLocator,
243-
keyspaceName,
244-
tableName,
245-
partitionsPerHost,
246-
partitionKeyMapper)
247-
}
248-
249-
250-
/**
251-
* A Serializable version of repartitionByCassandraReplica which removes
252-
* the implicit RowWriterFactory Dependency
253-
*/
254-
private[connector] def repartitionByCassandraReplica(
255-
replicaLocator: ReplicaLocator[T],
256-
keyspaceName: String,
257-
tableName: String,
258-
partitionsPerHost: Int,
259-
partitionKeyMapper: ColumnSelector)(
260-
implicit
261-
connector: CassandraConnector,
262-
currentType: ClassTag[T],
263-
rwf: RowWriterFactory[T]): CassandraPartitionedRDD[T] = {
264-
265240
val partitioner = new ReplicaPartitioner[T](
266241
tableName,
267242
keyspaceName,

0 commit comments

Comments
 (0)