Package org.voltdb.client

Examples of org.voltdb.client.NullCallback


                }
                params[i] = newInner;
            }
        } // FOR
       
        this.client.callProcedure(new NullCallback(), this.catalog_proc.getName(), params);
       
        final AtomicReference<LocalTransaction> lastTxn = new AtomicReference<LocalTransaction>();
        final CountDownLatch latch = new CountDownLatch(1);
        EventObserver<LocalTransaction> newTxnObserver = new EventObserver<LocalTransaction>() {
            @Override
View Full Code Here


        // SpecExecScheduler has stuff to look at when the PartitionExecutor is idle.
        final int sleepBefore = 5000; // ms
        final int sleepAfter = 5000; // ms
        procName = Sleeper.class.getSimpleName();
        params = new Object[]{ WAREHOUSE_ID+1, sleepBefore, sleepAfter };
        client.callProcedure(new NullCallback(), procName, params);
       
        // Now fire off a distributed NewOrder transaction
        final LatchableProcedureCallback dtxnCallback = new LatchableProcedureCallback(1);
        procName = neworder.class.getSimpleName();
        params = RegressionSuiteUtil.generateNewOrder(catalogContext.numberOfPartitions, true, WAREHOUSE_ID, DISTRICT_ID);
View Full Code Here

//    }

    void callHelper(Client client, String procname, Object ...objects )
    throws InterruptedException, IOException
    {
        NullCallback nullCallback = new NullCallback();
        boolean done;
        do {
            done = client.callProcedure(nullCallback, procname, objects);
            if (!done) {
                client.backpressureBarrier();
View Full Code Here

        @Override
        public Connection call() throws Exception {
            try {
                if (m_sendShutdown) {
                    NullCallback cb = new NullCallback();
                    (m_handler).invokeProcedure(this, cb, "@Shutdown");
                }

                if (!m_writeStream.isEmpty()) {
                   invocationsToCreate.getAndSet(0);
View Full Code Here

     */
    protected boolean cleanupLastRun() {
        try {
            for (Tourney t : tournaments) {
                this.getClientHandle().callProcedure(
                        new NullCallback(),
                        "DeleteTournament",
                        (long)t.tid);
            }
            this.getClientHandle().drain();
        } catch (Exception e) {
View Full Code Here

                            if (uploadArgs.isEmpty() == false) curClientArgs.addAll(uploadArgs);
                           
                            if (local_client != null && i % 3 == 0) {
                                String procName = VoltSystemProcedure.procCallName(NoOp.class);
                                try {
                                    local_client.callProcedure(new NullCallback(), procName);
                                } catch (Exception ex) {
                                    throw new RuntimeException(ex);
                                }       
                            }
                        }
View Full Code Here

        while (warmupEndTime > System.currentTimeMillis()) {
            // Get the next phone call
            PhoneCallGenerator.PhoneCall call = switchboard.receive();

            // asynchronously call the "Vote" procedure
            client.callProcedure(new NullCallback(),
                                 "Vote",
                                 call.phoneNumber,
                                 call.contestantNumber,
                                 config.maxvotes);
        }
View Full Code Here

        // The throughput may be throttled depending on client configuration
        System.out.println("Warming up...");
        final long warmupEndTime = System.currentTimeMillis() + (1000l * config.warmup);
        while (warmupEndTime > System.currentTimeMillis()) {
            // asynchronously call the next procedure
            client.callProcedure(new NullCallback(), nextProc().getFirst(), rand.nextInt(), payload);
        }

        // reset the stats after warmup
        fullStatsContext.fetchAndResetBaseline();
        periodicStatsContext.fetchAndResetBaseline();
View Full Code Here

    {
        // Call the proc with the NullCallback because we're not
        // being super picky about failure handling. If it fails,
        // it will show up in the client-side statistics we print
        // out in printReport().
        client.callProcedure(new NullCallback(),
                "TIMEDATA.insert",
                uuid,
                val,
                update_ts);
    }
View Full Code Here

        // preload keys if requested
        System.out.println();
        if (config.preload) {
            System.out.println("Preloading data store...");
            for(int i=0; i < config.poolsize; i++) {
                client.callProcedure(new NullCallback(),
                                     "STORE.upsert",
                                     String.format(processor.KeyFormat, i),
                                     processor.generateForStore().getStoreValue());
            }
            client.drain();
            System.out.println("Preloading complete.\n");
        }

        System.out.print(HORIZONTAL_RULE);
        System.out.println(" Starting Benchmark");
        System.out.println(HORIZONTAL_RULE);

        // Run the benchmark loop for the requested warmup time
        // The throughput may be throttled depending on client configuration
        System.out.println("Warming up...");
        final long warmupEndTime = System.currentTimeMillis() + (1000l * config.warmup);
        while (warmupEndTime > System.currentTimeMillis()) {
            // Decide whether to perform a GET or PUT operation
            if (rand.nextDouble() < config.getputratio) {
                // Get a key/value pair using inbuilt select procedure, asynchronously
                client.callProcedure(new NullCallback(), "STORE.select", processor.generateRandomKeyForRetrieval());
            }
            else {
                // Put a key/value pair using inbuilt upsert procedure, asynchronously
                final PayloadProcessor.Pair pair = processor.generateForStore();
                client.callProcedure(new NullCallback(), "STORE.upsert", pair.Key, pair.getStoreValue());
            }
        }

        // reset the stats after warmup
        fullStatsContext.fetchAndResetBaseline();
View Full Code Here

TOP

Related Classes of org.voltdb.client.NullCallback

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.