Examples of ClientConfig


Examples of voldemort.client.ClientConfig

                                                        STORES_XML,
                                                        props);

        socketUrl = servers[0].getIdentityNode().getSocketUrl().toString();
        String bootstrapUrl = socketUrl;
        ClientConfig clientConfig = new ClientConfig().setBootstrapUrls(bootstrapUrl)
                                                      .setEnableCompressionLayer(false)
                                                      .setEnableSerializationLayer(false)
                                                      .enableDefaultClient(true)
                                                      .setEnableLazy(false);
View Full Code Here

Examples of voldemort.client.ClientConfig

        Node node = cluster.getNodeById(0);
        String bootstrapUrl = "tcp://" + node.getHost() + ":" + node.getSocketPort();
        AdminClient adminClient = new AdminClient(bootstrapUrl,
                                                  new AdminClientConfig(),
                                                  new ClientConfig());

        byte[] value = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
        byte[] value2 = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };

        // make versions
View Full Code Here

Examples of voldemort.client.ClientConfig

                                                                               freePort);
        socketService.start();

        Thread.sleep(1000);

        SocketStoreClientFactory storeClientFactory = new SocketStoreClientFactory(new ClientConfig().setBootstrapUrls("tcp://localhost:"
                                                                                                                       + freePort)
                                                                                                     .setMaxBootstrapRetries(10));
        StoreClient<String, String> storeClient = storeClientFactory.getStoreClient("test");
        storeClient.put("someKey", "someValue");
        assertEquals(storeClient.getValue("someKey"), "someValue");
View Full Code Here

Examples of voldemort.client.ClientConfig

        private final ClientConfig config;

        public SocketStoreClientFactoryForTest(String testStoreName, String slopStoreName) {
            this.storeName = testStoreName;
            this.slopStoreName = slopStoreName;
            config = new ClientConfig();
            storeFactory = new ClientRequestExecutorPool(config.getSelectors(),
                                                         config.getMaxConnectionsPerNode(),
                                                         config.getConnectionTimeout(TimeUnit.MILLISECONDS),
                                                         SOCKET_TIMEOUT_MS,
                                                         config.getSocketBufferSize(),
View Full Code Here

Examples of voldemort.client.ClientConfig

        // Start another node for only this unit test
        HashMap<ByteArray, byte[]> entrySet =
                ServerTestUtils.createRandomKeyValuePairs(100);

        SocketStoreClientFactory factory = new SocketStoreClientFactory(new
                                                                        ClientConfig().setBootstrapUrls(Lists.newArrayList("tcp://"
                                                                                                                           + currentCluster.getNodeById(0)
                                                                                                                                           .getHost()
                                                                                                                           + ":"
                                                                                                                           + currentCluster.getNodeById(0)
View Full Code Here

Examples of voldemort.client.ClientConfig

            inputReader = new BufferedReader(new InputStreamReader(System.in));
        } catch(IOException e) {
            Utils.croak("Failure to open input stream: " + e.getMessage());
        }

        ClientConfig clientConfig = new ClientConfig().setBootstrapUrls(bootstrapUrl)
                                                      .setEnableLazy(false)
                                                      .setRequestFormatType(RequestFormatType.VOLDEMORT_V3);

        StoreClientFactory factory = null;
        DefaultStoreClient<Object, Object> client = null;
View Full Code Here

Examples of voldemort.client.ClientConfig

    private static Pair<Schema, Schema> getLatestKeyValueSchema(String url, String storeName) {

        AdminClient adminClient = null;
        try {
            adminClient = new AdminClient(url, new AdminClientConfig(), new ClientConfig());
            List<StoreDefinition> storeDefs = adminClient.metadataMgmtOps.getRemoteStoreDefList()
                                                                         .getValue();

            for(StoreDefinition storeDef: storeDefs) {
                if(storeDef.getName().equals(storeName)) {
View Full Code Here

Examples of voldemort.client.ClientConfig

        for(int i = 0; i < numServers; ++i) {
            servers.add(voldemortServers[i]);
        }

        String bootstrapUrl = cluster.getNodeById(0).getSocketUrl().toString();
        storeClient = new SocketStoreClientFactory(new ClientConfig().setBootstrapUrls(bootstrapUrl)).getStoreClient(STORE_NAME);

        Map<String, String> entries = Maps.newHashMap();
        entries.put("a", "1");
        entries.put("b", "2");
        for(Map.Entry<String, String> entry: entries.entrySet())
View Full Code Here

Examples of voldemort.client.ClientConfig

                thread.setName("stress-test");
                return thread;
            }
        });
        try {
            final SocketStoreClientFactory factory = new SocketStoreClientFactory(new ClientConfig().setBootstrapUrls(url)
                                                                                                    .setEnableLazy(false)
                                                                                                    .setConnectionTimeout(timeoutSecs,
                                                                                                                          TimeUnit.SECONDS)
                                                                                                    .setSocketTimeout(timeoutSecs,
                                                                                                                      TimeUnit.SECONDS)
View Full Code Here

Examples of voldemort.client.ClientConfig

    public void setUp() throws Exception {
        deploy(hostNames, ec2FailureDetectorTestConfig);
        startClusterAsync(hostNames, ec2FailureDetectorTestConfig, nodeIds);

        String url = "tcp://" + getRandomHostName() + ":6666";
        StoreClientFactory scf = new SocketStoreClientFactory(new ClientConfig().setBootstrapUrls(url));

        failureDetector = scf.getFailureDetector();
        store = scf.getStoreClient("test");
    }
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.