Skip to content
This repository has been archived by the owner on Mar 7, 2018. It is now read-only.

Ensure that a single Cassandra connector is shared #107

Merged
merged 1 commit into from
Aug 25, 2017

Conversation

c-w
Copy link
Contributor

@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 August 25, 2017 00:15
@c-w c-w force-pushed the cassandra-implicit-connector branch from 145bd42 to e902a90 Compare August 25, 2017 00:15
@@ -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
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in b889974.

@c-w c-w force-pushed the cassandra-implicit-connector branch from e902a90 to b889974 Compare August 25, 2017 00:32
@c-w c-w merged commit 720c080 into master Aug 25, 2017
@c-w c-w deleted the cassandra-implicit-connector branch August 25, 2017 00:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants