Skip to content

Commit 1aaaff3

Browse files
authored
Merge pull request #1301 from yohannrub/SPARKC-641-b2.5
SPARKC-641 Config deprecations are not checked when instantiating CassandraConnector
2 parents 08bf6eb + 902f57a commit 1aaaff3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ object CassandraConnector extends Logging {
220220

221221
/** Returns a CassandraConnector created from properties found in the [[org.apache.spark.SparkConf SparkConf]] object */
222222
def apply(conf: SparkConf): CassandraConnector = {
223-
CassandraConnector(CassandraConnectorConf.fromSparkConf(conf))
223+
CassandraConnector(CassandraConnectorConf(conf))
224224
}
225225

226226
/** Returns a CassandraConnector with runtime Cluster Environment information. This can set remoteConnectionsPerExecutor

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,6 @@ object CassandraConnectorConf extends Logging {
355355
}
356356

357357
def apply(conf: SparkConf): CassandraConnectorConf = {
358-
ConfigCheck.checkConfig(conf)
359358
fromSparkConf(conf)
360359
}
361360

@@ -410,6 +409,9 @@ object CassandraConnectorConf extends Logging {
410409
}
411410

412411
def fromSparkConf(conf: SparkConf) = {
412+
413+
ConfigCheck.checkConfig(conf)
414+
413415
val localDC = conf.getOption(LocalDCParam.name)
414416
val keepAlive = conf.getInt(KeepAliveMillisParam.name, KeepAliveMillisParam.default)
415417
val minReconnectionDelay = conf.getInt(MinReconnectionDelayParam.name, MinReconnectionDelayParam.default)

0 commit comments

Comments
 (0)