Examples of LatencyScoreStrategy


Examples of com.netflix.astyanax.connectionpool.LatencyScoreStrategy

                configuration.setDefaultWriteConsistencyLevel(ConsistencyLevel.valueOf(com.netflix.jmeter.properties.Properties.instance.cassandra.getWriteConsistency()));

                logger.info("AstyanaxConfiguration: " + configuration.toString());

                String property = config.getProperty("astyanax.connection.latency.stategy", "EmptyLatencyScoreStrategyImpl");
                LatencyScoreStrategy latencyScoreStrategy = null;
                if (property.equalsIgnoreCase("SmaLatencyScoreStrategyImpl"))
                {
                    int updateInterval = Integer.parseInt(config.getProperty("astyanax.connection.latency.stategy.updateInterval", "2000"));
                    int resetInterval = Integer.parseInt(config.getProperty("astyanax.connection.latency.stategy.resetInterval", "10000"));
                    int windowSize = Integer.parseInt(config.getProperty("astyanax.connection.latency.stategy.windowSize", "100"));
View Full Code Here

Examples of com.netflix.astyanax.connectionpool.LatencyScoreStrategy

public class HostConnectionPoolPartitionTest {

    @Test
    public void testPartition() {
        LatencyScoreStrategy strategy = new SmaLatencyScoreStrategyImpl(10000, 60000, 100, 4.0);

        TokenHostConnectionPoolPartition partition = new TokenHostConnectionPoolPartition(new BigInteger("1"), strategy);

        List<TestHostConnectionPool> pools = Arrays.asList(
                makePool(1),
View Full Code Here

Examples of com.netflix.astyanax.connectionpool.LatencyScoreStrategy

    // Is there a reason that this test is in HostConnectionPoolPartitionTest?
    // Perhaps this should be moved to the existing TokenAwareConnectionPoolTest or
    // a new TokenParitionedTopologyTest?
    @Test
    public void testTopology() {
        LatencyScoreStrategy strategy = new SmaLatencyScoreStrategyImpl(10000,60000, 100, 4.0);

        int nHosts = 6;
        int nReplicationFactor = 3;

        TokenPartitionedTopology<TestClient> topology = new TokenPartitionedTopology<TestClient>(LongBOPPartitioner.get(), strategy);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.