Package edu.brown.hstore.txns

Examples of edu.brown.hstore.txns.DependencyTracker


                LOG.debug(String.format("%s - Generating %s with prefetchable queries",
                          ts, TransactionInitRequest.class.getSimpleName()));
           
            // We also need to add our boy to its base partition's DependencyTracker
            // This is so that we can store the prefetch results when they come back
            DependencyTracker depTracker = hstore_site.getDependencyTracker(ts.getBasePartition());
            TransactionInitRequest.Builder[] builders = this.prefetchPlanner.plan(ts, procParams,
                                                                                  depTracker, fs);
           
            // If the PrefetchQueryPlanner returns a null array, then there is nothing
            // that we can actually prefetch, so we'll just send the normal txn init requests
View Full Code Here


   
    public void addPartitionExecutor(int partition, PartitionExecutor executor) {
        assert(this.shutdown_state != ShutdownState.STARTED);
        assert(executor != null);
        this.executors[partition] = executor;
        this.depTrackers[partition] = new DependencyTracker(executor);
        this.executors[partition].initHStoreSite(this);
    }
View Full Code Here

                      ts, input_dep_id));

        // If the Transaction is on the same HStoreSite, then all the
        // input dependencies will be internal and can be retrieved locally
        if (ts instanceof LocalTransaction) {
            DependencyTracker txnTracker = null;
            if (ts.getBasePartition() != this.partitionId) {
                txnTracker = hstore_site.getDependencyTracker(ts.getBasePartition());
            } else {
                txnTracker = this.depTracker;
            }
            List<VoltTable> deps = txnTracker.getInternalDependency((LocalTransaction)ts, input_dep_id);
            assert(deps != null);
            assert(inputs.containsKey(input_dep_id) == false);
            inputs.put(input_dep_id, deps);
            if (trace.val)
                LOG.trace(String.format("%s - Retrieved %d INTERNAL VoltTables for DependencyId #%d",
View Full Code Here

            if (status == Status.OK) {
                if (trace.val)
                    LOG.trace(String.format("%s - Storing %d dependency results locally for successful work fragment",
                              ts, result.size()));
                assert(result.size() == outputDepIds.length);
                DependencyTracker otherTracker = this.hstore_site.getDependencyTracker(ts.getBasePartition());
                for (int i = 0; i < outputDepIds.length; i++) {
                    if (trace.val)
                        LOG.trace(String.format("%s - Storing DependencyId #%d [numRows=%d]\n%s",
                                  ts, outputDepIds[i], result.dependencies[i].getRowCount(),
                                  result.dependencies[i]));
                    try {
                        otherTracker.addResult(local_ts, this.partitionId, outputDepIds[i], result.dependencies[i]);
                    } catch (Throwable ex) {
//                        ex.printStackTrace();
                        String msg = String.format("Failed to stored Dependency #%d for %s [idx=%d, fragmentId=%d]",
                                                   outputDepIds[i], ts, i, fragmentIds[i]);
                        LOG.error(String.format("%s - WorkFragment:%d\nExpectedIds:%s\nOutputDepIds: %s\nResultDepIds: %s\n%s",
View Full Code Here

    private Map<String, Object> depTrackerInfo() {
        Map<String, Object> m = new LinkedHashMap<String, Object>();
        m.put("Dependency Trackers", null);
       
        for (int partition : hstore_site.getLocalPartitionIds()) {
            DependencyTracker depTracker = hstore_site.getDependencyTracker(partition);
            DependencyTracker.Debug depTrackerDbg = depTracker.getDebugContext();
           
            Map<String, Object> inner = new LinkedHashMap<String, Object>();
            boolean found = false;
            for (AbstractTransaction ts : siteDebug.getInflightTransactions()) {
                if ((ts instanceof LocalTransaction) == false ||
View Full Code Here

TOP

Related Classes of edu.brown.hstore.txns.DependencyTracker

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.