Package voldemort.cluster.failuredetector

Examples of voldemort.cluster.failuredetector.FailureDetectorConfig


    protected FailureDetector failureDetector, failureDetectorWithZones;

    @Before
    public void setUp() throws Exception {
        cluster = VoldemortTestConstants.getThreeNodeCluster();
        failureDetector = new BannagePeriodFailureDetector(new FailureDetectorConfig().setCluster(cluster));
        clusterWithZones = VoldemortTestConstants.getFourNodeClusterWithZones();
        failureDetectorWithZones = new BannagePeriodFailureDetector(new FailureDetectorConfig().setCluster(clusterWithZones));
        storeDef = new StoreDefinitionsMapper().readStoreList(new StringReader(VoldemortTestConstants.getSingleStoreWithZonesXml()))
                                               .get(0);
    }
View Full Code Here


                                      new Node(3, "test1", 3, 3, 3, ImmutableList.of(7, 8, 9)),
                                      new Node(4, "test1", 4, 4, 4, ImmutableList.of(10, 11, 12)));
        this.cluster = new Cluster(clusterName, nodes);
        this.time = SystemTime.INSTANCE;

        FailureDetectorConfig failureDetectorConfig = new FailureDetectorConfig().setImplementationClassName(failureDetectorClass.getName())
                                                                                 .setBannagePeriod(1000)
                                                                                 .setCluster(cluster)
                                                                                 .setStoreVerifier(create(cluster.getNodes()))
                                                                                 .setTime(time);
View Full Code Here

            throws Exception {
        if(failureDetector != null)
            failureDetector.destroy();

        // Using Threshold FD
        FailureDetectorConfig failureDetectorConfig = new FailureDetectorConfig();
        failureDetectorConfig.setImplementationClassName(ThresholdFailureDetector.class.getName());
        failureDetectorConfig.setCluster(cluster);
        failureDetectorConfig.setStoreVerifier(MutableStoreVerifier.create(subStores));

        failureDetector = FailureDetectorUtils.create(failureDetectorConfig, false);
    }
View Full Code Here

     */
    @Test
    public void testConfigureNodesLocalHost() throws Exception {
        List<Node> nodes = getTestNodes();
        Cluster cluster = new Cluster("test-route-all-local-pref-cluster", nodes);
        FailureDetector failureDetector = new ThresholdFailureDetector(new FailureDetectorConfig().setCluster(cluster));
        RoutingStrategy routingStrategy = new RouteToAllLocalPrefStrategy(cluster.getNodes());
        BasicPipelineData<byte[]> pipelineData = new BasicPipelineData<byte[]>();
        ConfigureNodesLocalHost<byte[], BasicPipelineData<byte[]>> action = new ConfigureNodesLocalHost<byte[], BasicPipelineData<byte[]>>(pipelineData,
                                                                                                                                           Event.COMPLETED,
                                                                                                                                           failureDetector,
View Full Code Here

        // Destroy any previous failure detector before creating the next one
        // (the final one is destroyed in tearDown).
        if(failureDetector != null)
            failureDetector.destroy();

        FailureDetectorConfig failureDetectorConfig = new FailureDetectorConfig().setImplementationClassName(BannagePeriodFailureDetector.class.getName())
                                                                                 .setBannagePeriod(BANNAGE_PERIOD)
                                                                                 .setCluster(cluster)
                                                                                 .setStoreVerifier(create(subStores));
        failureDetector = create(failureDetectorConfig, false);
    }
View Full Code Here

                                                                                          node.getSocketPort(),
                                                                                          clientConfig.getRequestFormatType());
            stores.put(node.getId(), socketStore);
        }

        FailureDetectorConfig failureDetectorConfig = new FailureDetectorConfig().setImplementationClassName(BannagePeriodFailureDetector.class.getName())
                                                                                 .setCluster(cluster)
                                                                                 .setStoreVerifier(MutableStoreVerifier.create(stores));
        FailureDetector failureDetector = FailureDetectorUtils.create(failureDetectorConfig, false);

        ExecutorService routedStoreThreadPool = Executors.newFixedThreadPool(clientConfig.getMaxThreads());
View Full Code Here

        populateSlops(0, slopStoreNode0, entrySet1, entrySet2);

        StreamingSlopPusherJob pusher = new StreamingSlopPusherJob(getVoldemortServer(0).getStoreRepository(),
                                                                   getVoldemortServer(0).getMetadataStore(),
                                                                   new BannagePeriodFailureDetector(new FailureDetectorConfig().setCluster(cluster)
                                                                                                                               .setStoreVerifier(new ServerStoreVerifier(socketStoreFactory,
                                                                                                                                                                         metadataStore,
                                                                                                                                                                         configs[0]))),
                                                                   configs[0],
                                                                   new ScanPermitWrapper(1));
View Full Code Here

        List<Versioned<Slop>> firstSet = entrySet.subList(0, 7), secondSet = entrySet.subList(7, 15);
        populateSlops(0, slopStoreNode0, firstSet);

        StreamingSlopPusherJob pusher = new StreamingSlopPusherJob(getVoldemortServer(0).getStoreRepository(),
                                                                   getVoldemortServer(0).getMetadataStore(),
                                                                   new BannagePeriodFailureDetector(new FailureDetectorConfig().setCluster(cluster)
                                                                                                                               .setStoreVerifier(new ServerStoreVerifier(socketStoreFactory,
                                                                                                                                                                         metadataStore,
                                                                                                                                                                         configs[0]))),
                                                                   configs[0],
                                                                   new ScanPermitWrapper(1));
View Full Code Here

        populateSlops(0, slopStoreNode0, entrySet);

        StreamingSlopPusherJob pusher = new StreamingSlopPusherJob(getVoldemortServer(0).getStoreRepository(),
                                                                   getVoldemortServer(0).getMetadataStore(),
                                                                   new BannagePeriodFailureDetector(new FailureDetectorConfig().setCluster(cluster)
                                                                                                                               .setStoreVerifier(new ServerStoreVerifier(socketStoreFactory,
                                                                                                                                                                         metadataStore,
                                                                                                                                                                         configs[0]))),
                                                                   configs[0],
                                                                   new ScanPermitWrapper(1));
View Full Code Here

        populateSlops(0, slopStoreNode0, entrySetNode0);
        populateSlops(1, slopStoreNode1, entrySetNode1);

        StreamingSlopPusherJob pusher0 = new StreamingSlopPusherJob(getVoldemortServer(0).getStoreRepository(),
                                                                    getVoldemortServer(0).getMetadataStore(),
                                                                    new BannagePeriodFailureDetector(new FailureDetectorConfig().setCluster(cluster)
                                                                                                                                .setStoreVerifier(new ServerStoreVerifier(socketStoreFactory,
                                                                                                                                                                          metadataStore,
                                                                                                                                                                          configs[0]))),
                                                                    configs[0],
                                                                    new ScanPermitWrapper(1)), pusher1 = new StreamingSlopPusherJob(getVoldemortServer(1).getStoreRepository(),
                                                                                                                                    getVoldemortServer(1).getMetadataStore(),
                                                                                                                                    new BannagePeriodFailureDetector(new FailureDetectorConfig().setCluster(cluster)
                                                                                                                                                                                                .setStoreVerifier(new ServerStoreVerifier(socketStoreFactory,
                                                                                                                                                                                                                                          metadataStore,
                                                                                                                                                                                                                                          configs[1]))),
                                                                                                                                    configs[1],
                                                                                                                                    new ScanPermitWrapper(1));
View Full Code Here

TOP

Related Classes of voldemort.cluster.failuredetector.FailureDetectorConfig

Copyright © 2018 www.massapicom. 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.