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
merged 1 commit into from Aug 25, 2017

Conversation

Projects
None yet
2 participants
@c-w
Copy link
Member

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 added the in progress label 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)

This comment has been minimized.

Copy link
@kevinhartman

kevinhartman Aug 25, 2017

Contributor

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)?

This comment has been minimized.

Copy link
@c-w

c-w Aug 25, 2017

Author Member

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

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@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.
You can’t perform that action at this time.