Examples of ServerThread


Examples of org.voltdb.ServerThread

        pb.addProcedures(ALL_PROCEDURES);
        pb.addSupplementalClasses(SUPPLEMENTALS);
        pb.compile(catalogJar, siteCount, 0);

        // start VoltDB server using hzsqlsb backend
        server = new ServerThread(catalogJar, target);
        server.start();
        server.waitForInitialization();

        client = ClientFactory.createClient();
        // connect
View Full Code Here

Examples of org.voltdb.ServerThread

        assertTrue(success);
        MiscUtils.copyFile(builder.getPathToDeployment(), pathToDeployment);
        Configuration config = new Configuration();
        config.m_pathToCatalog = pathToCatalog;
        config.m_pathToDeployment = pathToDeployment;
        localServer = new ServerThread(config);
        client = null;

        localServer.start();
        localServer.waitForInitialization();
View Full Code Here

Examples of org.voltdb.ServerThread

        assert(success);

        VoltDB.Configuration config = new VoltDB.Configuration();
        config.m_pathToCatalog = Configuration.getPathToCatalogForTest("jsonperf.jar");
        config.m_pathToDeployment = builder.getPathToDeployment();
        ServerThread server = new ServerThread(config);
        server.start();
        server.waitForInitialization();

        Client client = ClientFactory.createClient();
        client.createConnection("localhost");

        ClientResponse response1;
View Full Code Here

Examples of org.voltdb.ServerThread

            }
        }
    }

    public void JSONBench(int clientCount, int iterations) throws Exception {
        ServerThread server = startup();
        Thread.sleep(1000);

        JSONClient[] clients = new JSONClient[clientCount];
        for (int i = 0; i < clientCount; i++)
            clients[i] = new JSONClient(i, iterations);

        long execTime = 0;

        long start = System.nanoTime();
        for (JSONClient client : clients) {
            client.start();
        }
        for (JSONClient client : clients) {
            client.join();
            execTime += client.totalExecTime;
        }

        long finish = System.nanoTime();

        double seconds = (finish - start) / (1000d * 1000d * 1000d);
        double rate = (iterations * clientCount) / seconds;
        double latency = execTime / (double) (iterations * clientCount);
        latency /= 1000d * 1000d;

        System.out.printf("Simple bench did %.2f iterations / sec at %.2f ms latency per txn.\n", rate, latency);

        server.shutdown();
        server.join();
    }
View Full Code Here

Examples of org.voltdb.ServerThread

            System.exit(-1);
        }
        String pathToDeployment = project.getPathToDeployment();

        // start up voltdb
        ServerThread server = new ServerThread(Configuration.getPathToCatalogForTest("poc.jar"), pathToDeployment, BackendTarget.NATIVE_EE_JNI);
        server.start();
        server.waitForInitialization();

        final org.voltdb.client.Client voltclient = ClientFactory.createClient();
        voltclient.createConnection("localhost");

        // create initial items
        voltclient.callProcedure("CreateItem", 0, 10);
        voltclient.callProcedure("CreateItem", 1, 11);
        voltclient.callProcedure("CreateItem", 2, 12);

        // check that the query does the right thing
        VoltTable result = voltclient.callProcedure("GetItems",11,1,1).getResults()[0];
        System.out.println(result.toJSONString());
        if (result.getRowCount() != 1) {
            System.err.printf("Call failed with %d rows\n", result.getRowCount());
        }

        // clean up / shutdown
        voltclient.close();
        server.shutdown();
        server.join();
    }
View Full Code Here

Examples of org.voltdb.ServerThread

        config.m_pathToCatalog = Configuration.getPathToCatalogForTest("simple.jar");
        System.out.println("catalog path: " + config.m_pathToCatalog);
        config.m_pathToDeployment = Configuration.getPathToCatalogForTest("simple.xml");
        System.out.println("deployment path: " + config.m_pathToDeployment);
        config.m_port = VoltDB.DEFAULT_PORT;
        ServerThread server = new ServerThread(config);
        server.start();

        server.join();
    }
View Full Code Here

Examples of org.voltdb.ServerThread

            depBuilder.writeXML(Configuration.getPathToCatalogForTest("timeouts.xml"));

            VoltDB.Configuration config = new VoltDB.Configuration();
            config.m_pathToCatalog = Configuration.getPathToCatalogForTest("timeouts.jar");
            config.m_pathToDeployment = Configuration.getPathToCatalogForTest("timeouts.xml");
            localServer = new ServerThread(config);
            localServer.start();
            localServer.waitForInitialization();
        }
        catch (Exception e) {
            e.printStackTrace();
View Full Code Here

Examples of org.voltdb.ServerThread

        File f = new File(testjar);
        f.delete();
    }

    private static void startServer() throws ClassNotFoundException, SQLException {
        server = new ServerThread(testjar, pb.getPathToDeployment(),
                                  BackendTarget.NATIVE_EE_JNI);
        server.start();
        server.waitForInitialization();

        Class.forName("org.voltdb.jdbc.Driver");
View Full Code Here

Examples of org.voltdb.ServerThread

        MiscUtils.copyFile(builder.getPathToDeployment(), Configuration.getPathToCatalogForTest("rejoin.xml"));

        VoltDB.Configuration config = new VoltDB.Configuration();
        config.m_pathToCatalog = Configuration.getPathToCatalogForTest("rejoin.jar");
        config.m_pathToDeployment = Configuration.getPathToCatalogForTest("rejoin.xml");
        ServerThread localServer = new ServerThread(config);
        localServer.start();
        localServer.waitForInitialization();

        Thread.sleep(240000);
    }
View Full Code Here

Examples of org.voltdb.ServerThread

        pb.addProcedures(procedures);
        pb.addSupplementalClasses(SUPPLEMENTALS);
        pb.compile(catalogJar, siteCount, 0);

        // start VoltDB server using hzsqlsb backend
        server = new ServerThread(catalogJar, pb.getPathToDeployment(), target);
        server.start();
        server.waitForInitialization();

        ClientConfig clientConfig = new ClientConfig("program", "none");
        client = ClientFactory.createClient(clientConfig);
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.