Package voldemort.store.socket.clientrequest

Examples of voldemort.store.socket.clientrequest.ClientRequestExecutorPool


    public SocketStoreClientFactory(ClientConfig config) {
        super(config);
        this.requestRoutingType = RequestRoutingType.getRequestRoutingType(RoutingTier.SERVER.equals(config.getRoutingTier()),
                                                                           false);
        this.storeFactory = new ClientRequestExecutorPool(config.getSelectors(),
                                                          config.getMaxConnectionsPerNode(),
                                                          config.getConnectionTimeout(TimeUnit.MILLISECONDS),
                                                          config.getSocketTimeout(TimeUnit.MILLISECONDS),
                                                          config.getSocketBufferSize(),
                                                          config.getSocketKeepAlive(),
View Full Code Here


                                                Properties properties,
                                                Cluster customCluster) throws IOException {
        boolean started = false;
        Cluster cluster = null;

        SocketStoreFactory socketStoreFactory = new ClientRequestExecutorPool(2,
                                                                              10000,
                                                                              100000,
                                                                              32 * 1024);

        try {
            while(!started) {
                try {
                    cluster = internalStartVoldemortCluster(voldemortServers.length,
                                                            voldemortServers,
                                                            partitionMap,
                                                            socketStoreFactory,
                                                            true,
                                                            clusterFile,
                                                            storeFile,
                                                            properties,
                                                            customCluster);
                    started = true;
                } catch(BindException be) {
                    logger.debug("Caught BindException when starting cluster. Will retry.");
                }
            }
        } finally {
            socketStoreFactory.close();
        }

        return cluster;
    }
View Full Code Here

    public static Cluster startVoldemortCluster(VoldemortServer[] servers,
                                                int[][] partitionMap,
                                                Properties serverProperties,
                                                String storesXmlFile) throws IOException {

        SocketStoreFactory socketStoreFactory = new ClientRequestExecutorPool(2,
                                                                              10000,
                                                                              100000,
                                                                              32 * 1024);
        Cluster cluster = null;
        try {
            cluster = ServerTestUtils.startVoldemortCluster(servers.length,
                                                            servers,
                                                            partitionMap,
                                                            socketStoreFactory,
                                                            true,
                                                            null,
                                                            storesXmlFile,
                                                            serverProperties);
        } finally {
            socketStoreFactory.close();
        }

        return cluster;
    }
View Full Code Here

            throws IOException {

        VoldemortServer[] servers = new VoldemortServer[1];
        int partitionMap[][] = { { 0, 1, 2, 3 } };

        SocketStoreFactory socketStoreFactory = new ClientRequestExecutorPool(2,
                                                                              10000,
                                                                              100000,
                                                                              32 * 1024);
        try {
            Cluster cluster = ServerTestUtils.startVoldemortCluster(1,
                                                                    servers,
                                                                    partitionMap,
                                                                    socketStoreFactory,
                                                                    true,
                                                                    null,
                                                                    storesXmlFile,
                                                                    serverProperties);
        } finally {
            socketStoreFactory.close();
        }

        return servers[0];
    }
View Full Code Here

    List<StoreDefinition> newstoredefs;
    Cluster newCluster;

    @Before
    public void setUp() throws Exception {
        SocketStoreFactory socketStoreFactory = new ClientRequestExecutorPool(2,
                                                                              10000,
                                                                              100000,
                                                                              32 * 1024);

        int numServers = 2;
View Full Code Here

TOP

Related Classes of voldemort.store.socket.clientrequest.ClientRequestExecutorPool

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.