Package voldemort.store.http

Examples of voldemort.store.http.HttpStore


        connectionManager.setMaxTotal(numThreads);
        connectionManager.setDefaultMaxPerRoute(numThreads);
        HttpConnectionParams.setStaleCheckingEnabled(clientParams, false);

        final HttpStore httpStore = new HttpStore("test",
                                                  "localhost",
                                                  8080,
                                                  httpClient,
                                                  new RequestFormatFactory().getRequestFormat(RequestFormatType.VOLDEMORT_V0),
                                                  false);
        Thread.sleep(400);

        PerformanceTest httpWriteTest = new PerformanceTest() {

            @Override
            public void doOperation(int i) {
                byte[] key = String.valueOf(i).getBytes();
                httpStore.put(new ByteArray(key), new Versioned<byte[]>(key), null);
            }
        };
        System.out.println("###########################################");
        System.out.println("Performing HTTP write test.");
        httpWriteTest.run(numRequests, numThreads);
        httpWriteTest.printStats();
        System.out.println();

        PerformanceTest httpReadTest = new PerformanceTest() {

            @Override
            public void doOperation(int i) {
                httpStore.get(new ByteArray(String.valueOf(i).getBytes()), null);
            }
        };
        System.out.println("Performing HTTP read test.");
        httpReadTest.run(numRequests, numThreads);
        httpReadTest.printStats();
View Full Code Here


    public static HttpStore getHttpStore(String storeName,
                                         RequestFormatType format,
                                         int port,
                                         final HttpClient httpClient) {
        return new HttpStore(storeName,
                             "localhost",
                             port,
                             httpClient,
                             new RequestFormatFactory().getRequestFormat(format),
                             false);
View Full Code Here

    @Override
    protected Store<ByteArray, byte[], byte[]> getStore(String name,
                                                        String host,
                                                        int port,
                                                        RequestFormatType type) {
        return new HttpStore(name,
                             host,
                             port,
                             httpClient,
                             requestFormatFactory.getRequestFormat(type),
                             reroute);
View Full Code Here

TOP

Related Classes of voldemort.store.http.HttpStore

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.