Skip to content
This repository has been archived by the owner. It is now read-only.

Ensure that a single Cassandra connector is shared #107

merged 1 commit into from Aug 25, 2017


Copy link

@c-w c-w commented Aug 25, 2017

As per conversation in Slack. Still needs to be perf-tested to see if there's an improvement. (In any case it shouldn't hurt.)

@c-w c-w requested a review from kevinhartman Aug 25, 2017
@c-w c-w force-pushed the cassandra-implicit-connector branch from 145bd42 to e902a90 Aug 25, 2017
@@ -92,6 +93,7 @@ object ProjectFortis extends App {

// Main starts here
val ssc = StreamingContext.getOrCreate(fortisSettings.progressDir, createStreamingContext)
implicit val connector: CassandraConnector = CassandraConnector(ssc.sparkContext)
Copy link

@kevinhartman kevinhartman Aug 25, 2017

Nothing will bind to this here. How about putting this inside CassandraEventsSink.apply and making it lazy as well (to ensure it doesn't get re-serialized for every task)?

Copy link
Contributor Author

@c-w c-w Aug 25, 2017

Done in b889974.

@c-w c-w force-pushed the cassandra-implicit-connector branch from e902a90 to b889974 Aug 25, 2017
@c-w c-w merged commit 720c080 into master Aug 25, 2017
2 checks passed
@c-w c-w deleted the cassandra-implicit-connector branch Aug 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants