Package org.voltdb

Examples of org.voltdb.ParameterSet


   
    private SynthesizedPlanFragment[] createReplicatedPlan(LocalTransaction ts, Table catalog_tbl, VoltTable table) {
        if (debug.val)
            LOG.debug(String.format("%s - %s is replicated. Creating %d fragments to send to all partitions",
                      ts, catalog_tbl.getName(), catalogContext.numberOfPartitions));
        ParameterSet params = new ParameterSet(catalog_tbl.getName(), table);
       
        final SynthesizedPlanFragment pfs[] = new SynthesizedPlanFragment[2];
        int idx = 0;
       
        // Create a work unit to invoke super.loadTable() on each partition
        pfs[idx] = new SynthesizedPlanFragment();
        pfs[idx].fragmentId = SysProcFragmentId.PF_loadDistribute;
        pfs[idx].outputDependencyIds = new int[] { (int)DEP_distribute };
        pfs[idx].inputDependencyIds = new int[] { };
        pfs[idx].multipartition = true;
        pfs[idx].nonExecSites = false;
        pfs[idx].parameters = params;

        // Create a work unit to aggregate the results.
        idx += 1;
        pfs[idx] = new SynthesizedPlanFragment();
        pfs[idx].fragmentId = SysProcFragmentId.PF_loadAggregate;
        pfs[idx].outputDependencyIds = new int[] { (int)DEP_aggregate };
        pfs[idx].inputDependencyIds = new int[] { (int)DEP_distribute };
        pfs[idx].multipartition = false;
        pfs[idx].nonExecSites = false;
        pfs[idx].parameters = new ParameterSet();
        pfs[idx].destPartitionId = this.partitionId;

        return (pfs);
    }
View Full Code Here


        // of the table that we just split up doesn't have any rows
        List<SynthesizedPlanFragment> pfs = new ArrayList<SynthesizedPlanFragment>();
        for (int i = 0; i < partitionedTables.length; ++i) {
            int partition = i;
            if (partitionedTables[partition] == null || partitionedTables[partition].getRowCount() == 0) continue;
            ParameterSet params = new ParameterSet(catalog_tbl.getName(), partitionedTables[partition]);
            SynthesizedPlanFragment pf = new SynthesizedPlanFragment();
            pf.fragmentId = SysProcFragmentId.PF_loadDistribute;
            pf.inputDependencyIds = new int[] { };
            pf.outputDependencyIds = new int[] { (int)DEP_distribute };
            pf.multipartition = false;
            pf.nonExecSites = false;
            pf.destPartitionId = partition; // partitionsToSites[i - 1];
            pf.parameters = params;
            pf.last_task = false;
            pfs.add(pf);
            if (trace.val)
                sb.append(String.format("\n  Partition #%d: %d tuples",
                          partition, partitionedTables[partition].getRowCount()));
        } // FOR
        if (trace.val) LOG.trace(sb.toString());

        // a final plan fragment to aggregate the results
        SynthesizedPlanFragment pf = new SynthesizedPlanFragment();
        pf.destPartitionId = this.partitionId;
        pf.fragmentId = SysProcFragmentId.PF_loadAggregate;
        pf.inputDependencyIds = new int[] { (int)DEP_distribute };
        pf.outputDependencyIds = new int[] { (int)DEP_aggregate };
        pf.multipartition = false;
        pf.nonExecSites = false;
        pf.last_task = true;
        pf.parameters = new ParameterSet();
        pfs.add(pf);

        return (pfs.toArray(new SynthesizedPlanFragment[0]));
    }
View Full Code Here

                String msg = String.format("Invalid configuration parameter '%s'", confNames[i]);
                throw new VoltAbortException(msg);
            }
        } // FOR
       
        ParameterSet params = new ParameterSet(confNames, confValues);
        return this.executeOncePerSite(DISTRIBUTE_ID, AGGREGATE_ID, params);
    }
View Full Code Here

     *
     * @return
     * @throws VoltAbortException
     */
    public VoltTable[] run(boolean save_to_file) throws VoltAbortException {
        ParameterSet params = new ParameterSet();
        params.setParameters(save_to_file);
       
        return this.executeOncePerPartition(SysProcFragmentId.PF_recomputeMarkovsDistribute,
                                            SysProcFragmentId.PF_recomputeMarkovsAggregate,
                                            params);
    }
View Full Code Here

        plan_fragment.fragmentId = SysProcFragmentId.PF_restoreLoadReplicatedTable;
        plan_fragment.multipartition = false;
        plan_fragment.outputDependencyIds = new int[] { result_dependency_id };
        plan_fragment.inputDependencyIds = new int[] {};
        addPlanDependencyId(result_dependency_id);
        ParameterSet params = new ParameterSet();
        params.setParameters(getTableName(), result_dependency_id, m_allowExport);
        plan_fragment.parameters = params;
        return plan_fragment;
    }
View Full Code Here

        // XXX plan_fragment.siteId = sourceSiteId;
        plan_fragment.destPartitionId = sourcePartitionId;
        plan_fragment.outputDependencyIds = new int[] { result_dependency_id };
        plan_fragment.inputDependencyIds = new int[] {};
        addPlanDependencyId(result_dependency_id);
        ParameterSet params = new ParameterSet();
        params.setParameters(getTableName(), destinationPartitionId, result_dependency_id, m_allowExport);
        plan_fragment.parameters = params;
        return plan_fragment;
    }
View Full Code Here

        plan_fragment.fragmentId = SysProcFragmentId.PF_restoreLoadReplicatedTableResults;
        plan_fragment.multipartition = false;
        plan_fragment.outputDependencyIds = new int[] { result_dependency_id };
        plan_fragment.inputDependencyIds = getPlanDependencyIds();
        setRootDependencyId(result_dependency_id);
        ParameterSet params = new ParameterSet();
        params.setParameters(result_dependency_id);
        plan_fragment.parameters = params;
        return plan_fragment;
    }
View Full Code Here

        plan_fragment.multipartition = false;
        plan_fragment.destPartitionId = distributorPartitionId;
        plan_fragment.outputDependencyIds = new int[] { result_dependency_id };
        plan_fragment.inputDependencyIds = new int[] {};
        addPlanDependencyId(result_dependency_id);
        ParameterSet params = new ParameterSet();
        params.setParameters(getTableName(), originalHostsArray, uncoveredPartitionsAtHost, result_dependency_id, m_allowExport);
        plan_fragment.parameters = params;
        return plan_fragment;
    }
View Full Code Here

        plan_fragment.fragmentId = SysProcFragmentId.PF_restoreDistributePartitionedTableResults;
        plan_fragment.multipartition = false;
        plan_fragment.outputDependencyIds = new int[] { result_dependency_id };
        plan_fragment.inputDependencyIds = getPlanDependencyIds();
        setRootDependencyId(result_dependency_id);
        ParameterSet params = new ParameterSet();
        params.setParameters(result_dependency_id);
        plan_fragment.parameters = params;
        return plan_fragment;
    }
View Full Code Here

        pfs[0] = new SynthesizedPlanFragment();
        pfs[0].fragmentId = SysProcFragmentId.PF_restoreScan;
        pfs[0].outputDependencyIds = new int[] { DEP_restoreScan };
        pfs[0].inputDependencyIds = new int[] {};
        pfs[0].multipartition = true;
        ParameterSet params = new ParameterSet();
        params.setParameters(filePath, fileNonce);
        pfs[0].parameters = params;

        // This fragment aggregates the save-to-disk sanity check results
        pfs[1] = new SynthesizedPlanFragment();
        pfs[1].fragmentId = SysProcFragmentId.PF_restoreScanResults;
        pfs[1].outputDependencyIds = new int[] { DEP_restoreScanResults };
        pfs[1].inputDependencyIds = new int[] { DEP_restoreScan };
        pfs[1].multipartition = false;
        pfs[1].parameters = new ParameterSet();

        VoltTable[] results;
        results = executeSysProcPlanFragments(pfs, DEP_restoreScanResults);
        return results;
    }
View Full Code Here

TOP

Related Classes of org.voltdb.ParameterSet

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.