spring-projects / spring-data-cassandra

Provides support to increase developer productivity in Java when using Apache Cassandra. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
https://spring.io/projects/spring-data-cassandra/
Apache License 2.0
379 stars 311 forks source link

Update CassandraCqlClusterFactoryBean with support for setting speculativeExecutionPolicy. [DATACASS-320] #489

Closed spring-projects-issues closed 4 years ago

spring-projects-issues commented 8 years ago

John Blum opened DATACASS-320 and commented

Update CassandraCqlClusterFactoryBean to include a setSpeculativeExecutionPolicy(:SpeculativeExecutionPolicy) method and update the afterPropertiesSet() method to set on the Cluster.Builder.

Example SpeculativeExecutionPolicy usage:

PerHostPercentileTracker tracker = PerHostPercentileTracker
    .builderWithHighestTrackableLatencyMillis(15000)
    .build();

PercentileSpeculativeExecutionPolicy policy = new PercentileSpeculativeExecutionPolicy(tracker, 99.0, 2);

Cluster.builder().addContactPoint("127.0.0.1")
    .withSpeculativeExecutionPolicy(policy)
    .build(); 

Affects: 1.4.2 (Hopper SR2)

Referenced from: pull request https://github.com/spring-projects/spring-data-cassandra/pull/79

spring-projects-issues commented 8 years ago

John Blum commented

Recent StackOverflow post pertaining to this JIRA ticket