Package voldemort.cluster

Examples of voldemort.cluster.Node


    }

    @Test
    public void testCumulativeFailures() throws Exception {
        Node node = Iterables.get(cluster.getNodes(), 8);

        recordException(failureDetector, node);
        assertUnavailable(node);

        time.sleep(BANNAGE_MILLIS / 2);
View Full Code Here


        assertAvailable(node);
    }

    @Test
    public void testForceSuccess() throws Exception {
        Node node = Iterables.get(cluster.getNodes(), 8);

        recordException(failureDetector, node);
        assertUnavailable(node);

        recordSuccess(failureDetector, node, 0, false);
View Full Code Here

        adminProperties.setProperty("max_connections", "20");
        adminClient = new AdminClient(cluster,
                                      new AdminClientConfig(adminProperties),
                                      new ClientConfig());

        Node node = cluster.getNodeById(0);
        String bootstrapUrl = "tcp://" + node.getHost() + ":" + node.getSocketPort();
        StoreClientFactory storeClientFactory = new SocketStoreClientFactory(new ClientConfig().setBootstrapUrls(bootstrapUrl));
        storeClient = storeClientFactory.getStoreClient(STORE_NAME);

    }
View Full Code Here

        return SystemTime.INSTANCE;
    }

    @Test
    public void testCatastrophicErrors() throws Exception {
        Node node = Iterables.get(cluster.getNodes(), 8);

        for(int i = 0; i < 1000; i++) {
            failureDetector.recordSuccess(node, 1);
        }
View Full Code Here

        failureDetector.waitForAvailability(node);
    }

    @Test
    public void testTimeouts() throws Exception {
        Node node = Iterables.get(cluster.getNodes(), 8);

        assertTrue(failureDetector.isAvailable(node));
        failureDetector.recordSuccess(node, 0);
        assertTrue(failureDetector.isAvailable(node));
View Full Code Here

    @Test
    public void testCliff() throws Exception {
        int minimum = failureDetector.getConfig().getThresholdCountMinimum();

        Node node = Iterables.get(cluster.getNodes(), 8);

        for(int iter = 0; iter < 2; iter++) {
            for(int i = 0; i < minimum - 1; i++)
                recordException(failureDetector, node);
View Full Code Here

        failureDetector.getConfig().setThreshold(SUCCESS_PERCENTAGE);
        failureDetector.getConfig().setThresholdCountMinimum(ERROR_COUNT_MINIMUM);

        int failureCount = 20;

        Node node = Iterables.get(cluster.getNodes(), 8);

        // Force the first 20 as failed to achieve an offline node...
        for(int i = 0; i < failureCount; i++)
            recordException(failureDetector, node);
View Full Code Here

        assertAvailable(node);
    }

    @Test
    public void testBorder() throws Exception {
        Node node = Iterables.get(cluster.getNodes(), 8);

        for(int i = 0; i < failureDetector.getConfig().getThresholdCountMinimum(); i++)
            recordException(failureDetector, node);

        // Move to right before the new interval...
View Full Code Here

    }

    @Test
    public void testChangeMetadata() throws Exception {
        cluster = getTenNodeCluster();
        Node node = cluster.getNodeById(9);
        storeVerifier.addStore(node);
        for(int i = 0; i < 10; i++) {
            failureDetector.recordException(node,
                                            0,
                                            new UnreachableStoreException("intentionalerror",
View Full Code Here

    // No longer a valid test: assumes the node list is static, but now it's being changed on demand
    @Test
    @Ignore
    public void testInvalidNode() throws Exception {
        Node invalidNode = new Node(10000,
                                    "localhost",
                                    8081,
                                    6666,
                                    6667,
                                    Collections.<Integer> emptyList());
View Full Code Here

TOP

Related Classes of voldemort.cluster.Node

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.