Search in sources :

Example 51 with ClientConfig

use of voldemort.client.ClientConfig in project voldemort by voldemort.

the class EndToEndTest method setUp.

@Before
public void setUp() throws IOException {
    int numServers = 2;
    VoldemortServer[] servers = new VoldemortServer[numServers];
    int[][] partitionMap = { { 0, 2, 4, 6 }, { 1, 3, 5, 7 } };
    Cluster cluster = ServerTestUtils.startVoldemortCluster(numServers, servers, partitionMap, socketStoreFactory, useNio, null, STORES_XML, new Properties());
    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);
}
Also used : SocketStoreClientFactory(voldemort.client.SocketStoreClientFactory) Node(voldemort.cluster.Node) Cluster(voldemort.cluster.Cluster) Properties(java.util.Properties) ClientConfig(voldemort.client.ClientConfig) SocketStoreClientFactory(voldemort.client.SocketStoreClientFactory) StoreClientFactory(voldemort.client.StoreClientFactory) Before(org.junit.Before)

Aggregations

ClientConfig (voldemort.client.ClientConfig)51 SocketStoreClientFactory (voldemort.client.SocketStoreClientFactory)37 VoldemortServer (voldemort.server.VoldemortServer)17 IOException (java.io.IOException)15 Properties (java.util.Properties)15 Test (org.junit.Test)15 Before (org.junit.Before)14 ByteArray (voldemort.utils.ByteArray)13 ArrayList (java.util.ArrayList)12 Cluster (voldemort.cluster.Cluster)12 ExecutorService (java.util.concurrent.ExecutorService)10 AdminClient (voldemort.client.protocol.admin.AdminClient)10 Node (voldemort.cluster.Node)10 StoreClientFactory (voldemort.client.StoreClientFactory)9 HashMap (java.util.HashMap)8 List (java.util.List)8 ClientRequestExecutorPool (voldemort.store.socket.clientrequest.ClientRequestExecutorPool)8 File (java.io.File)7 VoldemortException (voldemort.VoldemortException)7 CountDownLatch (java.util.concurrent.CountDownLatch)6