Package org.voltdb.types

Examples of org.voltdb.types.SpeculationType


    @Override
    protected synchronized void updateStatsRow(Object rowKey, Object[] rowValues) {
        @SuppressWarnings("unchecked")
        Pair<Integer, SpeculationType> rowKeyPair = (Pair<Integer, SpeculationType>) rowKey;
        Integer partition = rowKeyPair.getFirst();
        SpeculationType specType = rowKeyPair.getSecond();
        PartitionExecutor.Debug executorDebug = hstore_site.getPartitionExecutor(partition).getDebugContext();
        SpecExecScheduler.Debug specExecDebug = executorDebug.getSpecExecScheduler().getDebugContext();
        SpecExecProfiler profiler = specExecDebug.getProfiler(specType);
        assert(profiler != null);
       
        int offset = columnNameToIndex.get("PARTITION");
        double total = (double)profiler.total_time.getInvocations();
        rowValues[offset++] = partition;
        rowValues[offset++] = specType.toString();
        rowValues[offset++] = profiler.success;
        rowValues[offset++] = profiler.success / total;
        rowValues[offset++] = profiler.interrupts;
        rowValues[offset++] = profiler.interrupts / total;
        rowValues[offset++] = MathUtil.weightedMean(profiler.queue_size);
View Full Code Here


//                          this.specExecScheduler.getClass().getSimpleName(),
//                          this.partitionId,
//                          (this.currentDtxn != null ? "blocked on " + this.currentDtxn : "idle")));
            assert(hstore_conf.site.specexec_enable) :
                "Trying to schedule speculative txn even though it is disabled";
            SpeculationType specType = this.calculateSpeculationType();
            if (hstore_conf.site.exec_profiling) this.profiler.conflicts_time.start();
            try {
                specTxn = this.specExecScheduler.next(this.currentDtxn, specType);
            } finally {
                if (hstore_conf.site.exec_profiling) this.profiler.conflicts_time.stopIfStarted();
View Full Code Here

    /**
     * Figure out the current speculative execution mode for this partition
     * @return
     */
    private SpeculationType calculateSpeculationType() {
        SpeculationType specType = SpeculationType.NULL;

        // IDLE
        if (this.currentDtxn == null) {
            specType = SpeculationType.IDLE;
        }
View Full Code Here

                // txns at this partition. If there were, then we know that we can't commit the txn here.
                if (this.specExecSkipAfter == false) {
                    for (LocalTransaction spec_ts : this.specExecBlocked) {
                        // Check whether we can quickly ignore this speculative txn because
                        // it was executed at a stall point where conflicts don't matter.
                        SpeculationType specType = spec_ts.getSpeculationType();
                        if (specType != SpeculationType.SP2_REMOTE_AFTER && specType != SpeculationType.SP1_LOCAL) {
                            continue;
                        }
                       
                        if (debug.val)
View Full Code Here

    public void updateConf(HStoreConf hstore_conf, String[] changed) {
        // Tell the SpecExecScheduler to ignore certain SpeculationTypes
        if (hstore_conf.site.specexec_ignore_stallpoints != null) {
            if (this.ignore_types != null) this.ignore_types.clear();
            for (String element : StringUtil.splitList(hstore_conf.site.specexec_ignore_stallpoints)) {
                SpeculationType specType = SpeculationType.get(element);
                if (specType != null) this.ignoreSpeculationType(specType);
            } // FOR
        }
       
        this.ignore_queue_size_change = hstore_conf.site.specexec_ignore_queue_size_change;
View Full Code Here

TOP

Related Classes of org.voltdb.types.SpeculationType

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.