本文整理汇总了Java中org.voltdb.ParameterSet.setParameters方法的典型用法代码示例。如果您正苦于以下问题:Java ParameterSet.setParameters方法的具体用法?Java ParameterSet.setParameters怎么用?Java ParameterSet.setParameters使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.voltdb.ParameterSet
的用法示例。
在下文中一共展示了ParameterSet.setParameters方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: constructDistributeReplicatedTableFragment
import org.voltdb.ParameterSet; //导入方法依赖的package包/类
private SynthesizedPlanFragment constructDistributeReplicatedTableFragment(int sourcePartitionId, int destinationPartitionId) {
LOG.trace("constructDistributeReplicatedTableFragment : source -" + sourcePartitionId + " destination -" + destinationPartitionId);
int result_dependency_id = getNextDependencyId();
SynthesizedPlanFragment plan_fragment = new SynthesizedPlanFragment();
plan_fragment.fragmentId = SysProcFragmentId.PF_restoreDistributeReplicatedTable;
plan_fragment.multipartition = false;
// 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;
}
示例2: constructDistributePartitionedTableFragment
import org.voltdb.ParameterSet; //导入方法依赖的package包/类
private SynthesizedPlanFragment constructDistributePartitionedTableFragment(int distributorPartitionId, int uncoveredPartitionsAtHost[], int originalHostsArray[]) {
LOG.trace("constructDistributePartitionedTableFragment : to partition : " + distributorPartitionId);
int result_dependency_id = getNextDependencyId();
SynthesizedPlanFragment plan_fragment = new SynthesizedPlanFragment();
plan_fragment.fragmentId = SysProcFragmentId.PF_restoreDistributePartitionedTable;
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;
}
示例3: performSnapshotScanWork
import org.voltdb.ParameterSet; //导入方法依赖的package包/类
private final VoltTable[] performSnapshotScanWork(String path) {
SynthesizedPlanFragment[] pfs = new SynthesizedPlanFragment[2];
pfs[0] = new SynthesizedPlanFragment();
pfs[0].fragmentId = SysProcFragmentId.PF_snapshotScan;
pfs[0].outputDependencyIds = new int[] { DEP_snapshotScan };
pfs[0].multipartition = true;
ParameterSet params = new ParameterSet();
params.setParameters(path);
pfs[0].parameters = params;
pfs[1] = new SynthesizedPlanFragment();
pfs[1].fragmentId = SysProcFragmentId.PF_snapshotScanResults;
pfs[1].outputDependencyIds = new int[] { DEP_snapshotScanResults };
pfs[1].inputDependencyIds = new int[] { DEP_snapshotScan };
pfs[1].multipartition = false;
pfs[1].parameters = new ParameterSet();
VoltTable[] results;
results = executeSysProcPlanFragments(pfs, DEP_snapshotScanResults);
return results;
}
示例4: performSaveFeasibilityWork
import org.voltdb.ParameterSet; //导入方法依赖的package包/类
private final VoltTable[] performSaveFeasibilityWork(String filePath, String fileNonce) {
SynthesizedPlanFragment[] pfs = new SynthesizedPlanFragment[2];
// This fragment causes each execution site to confirm the likely
// success of writing tables to disk
pfs[0] = new SynthesizedPlanFragment();
pfs[0].fragmentId = SysProcFragmentId.PF_saveTest;
pfs[0].outputDependencyIds = new int[] { DEP_saveTest };
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_saveTestResults;
pfs[1].outputDependencyIds = new int[] { DEP_saveTestResults };
pfs[1].inputDependencyIds = new int[] { DEP_saveTest };
pfs[1].multipartition = false;
pfs[1].parameters = new ParameterSet();
VoltTable[] results;
results = executeSysProcPlanFragments(pfs, DEP_saveTestResults);
return results;
}
示例5: constructLoadReplicatedTableAggregatorFragment
import org.voltdb.ParameterSet; //导入方法依赖的package包/类
private SynthesizedPlanFragment constructLoadReplicatedTableAggregatorFragment() {
SystemProcedureExecutionContext context = this.getSystemProcedureExecutionContext();
assert (context != null);
int partition_id = context.getPartitionExecutor().getPartitionId();
LOG.trace("constructLoadReplicatedTableAggregatorFragment - partition : " + partition_id);
int result_dependency_id = getNextDependencyId();
SynthesizedPlanFragment plan_fragment = new SynthesizedPlanFragment();
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;
}
示例6: hashinate
import org.voltdb.ParameterSet; //导入方法依赖的package包/类
@Override
public int hashinate(Object value, int partitionCount)
{
ParameterSet parameterSet = new ParameterSet(true);
parameterSet.setParameters(value);
final FastSerializer fser = new FastSerializer();
try {
parameterSet.writeExternal(fser);
} catch (final IOException exception) {
throw new RuntimeException(exception);
}
m_data.clear();
m_data.putInt(Commands.Hashinate.m_id);
m_data.putInt(partitionCount);
m_data.put(fser.getBuffer());
try {
m_data.flip();
m_connection.write();
m_connection.readStatusByte();
ByteBuffer part = ByteBuffer.allocate(4);
while (part.hasRemaining()) {
int read = m_connection.m_socketChannel.read(part);
if (read <= 0) {
throw new EOFException();
}
}
part.flip();
return part.getInt();
} catch (final Exception e) {
System.out.println("Exception: " + e.getMessage());
throw new RuntimeException(e);
}
}
示例7: run
import org.voltdb.ParameterSet; //导入方法依赖的package包/类
public VoltTable[] run(int coordinator, String loadingTable, String destinationShim, String destinationFile) throws VoltAbortException {
ParameterSet params = new ParameterSet();
params.setParameters(coordinator, loadingTable, destinationShim, destinationFile);
SynthesizedPlanFragment pfs[] = new SynthesizedPlanFragment[2];
// create a work fragment to gather procedure data from each of the sites.
pfs[1] = new SynthesizedPlanFragment();
pfs[1].fragmentId = SysProcFragmentId.PF_loadingRemoteDistribute;
pfs[1].outputDependencyIds = new int[]{ DEP_loadingRemoteDistribute };
pfs[1].inputDependencyIds = new int[]{};
pfs[1].multipartition = true;
pfs[1].parameters = params;
// create a work fragment to aggregate the results.
// Set the MULTIPARTITION_DEPENDENCY bit to require a dependency from every site.
pfs[0] = new SynthesizedPlanFragment();
pfs[0].fragmentId = SysProcFragmentId.PF_loadingRemoteAggregate;
pfs[0].outputDependencyIds = new int[]{ DEP_loadingRemoteAggregate };
pfs[0].inputDependencyIds = new int[]{ DEP_loadingRemoteDistribute };
pfs[0].multipartition = false;
pfs[0].parameters = params;
// distribute and execute these fragments providing pfs and id of the
// aggregator's output dependency table.
VoltTable[] results = executeSysProcPlanFragments(pfs, DEP_loadingRemoteAggregate);
return results;
}
示例8: constructLoadReplicatedTableFragment
import org.voltdb.ParameterSet; //导入方法依赖的package包/类
private SynthesizedPlanFragment constructLoadReplicatedTableFragment() {
LOG.trace("constructLoadReplicatedTableFragment ");
int result_dependency_id = getNextDependencyId();
SynthesizedPlanFragment plan_fragment = new SynthesizedPlanFragment();
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;
}
示例9: run
import org.voltdb.ParameterSet; //导入方法依赖的package包/类
public VoltTable[] run(int coordinator, String extractionTable, String destinationShim, String destinationFile,
String caching) throws VoltAbortException {
// String msg = String.format("Coordinator=%s, extractionTable=%s, destinationShim=%s", coordinator, extractionTable, destinationShim);
// LOG.info(String.format("RUN : Init extraciton. %s", msg));
ParameterSet params = new ParameterSet();
params.setParameters(coordinator, extractionTable, destinationShim, destinationFile, Boolean.parseBoolean(caching));
// return this.executeOncePerSite(SysProcFragmentId.PF_extractionRemoteDistribute, SysProcFragmentId.PF_extractionRemoteAggregate, params)[0];
SynthesizedPlanFragment pfs[] = new SynthesizedPlanFragment[2];
// create a work fragment to gather procedure data from each of the sites.
pfs[1] = new SynthesizedPlanFragment();
pfs[1].fragmentId = SysProcFragmentId.PF_extractionRemoteDistribute;
pfs[1].outputDependencyIds = new int[]{ DEP_extractionRemoteDistribute };
pfs[1].inputDependencyIds = new int[]{};
pfs[1].multipartition = true;
pfs[1].parameters = params;
// create a work fragment to aggregate the results.
// Set the MULTIPARTITION_DEPENDENCY bit to require a dependency from every site.
pfs[0] = new SynthesizedPlanFragment();
pfs[0].fragmentId = SysProcFragmentId.PF_extractionRemoteAggregate;
pfs[0].outputDependencyIds = new int[]{ DEP_extractionRemoteAggregate };
pfs[0].inputDependencyIds = new int[]{ DEP_extractionRemoteDistribute };
pfs[0].multipartition = false;
pfs[0].parameters = params;
// distribute and execute these fragments providing pfs and id of the
// aggregator's output dependency table.
VoltTable[] results = executeSysProcPlanFragments(pfs, DEP_extractionRemoteAggregate);
return results;
}
示例10: performSnapshotCreationWork
import org.voltdb.ParameterSet; //导入方法依赖的package包/类
private final VoltTable[] performSnapshotCreationWork(String filePath, String fileNonce, long startTime, byte block) {
SynthesizedPlanFragment[] pfs = new SynthesizedPlanFragment[2];
LOG.trace("performSnapshotCreationWork starting");
// This fragment causes each execution site to confirm the likely
// success of writing tables to disk
pfs[0] = new SynthesizedPlanFragment();
pfs[0].fragmentId = SysProcFragmentId.PF_createSnapshotTargets;
pfs[0].outputDependencyIds = new int[] { DEP_createSnapshotTargets };
pfs[0].inputDependencyIds = new int[] {};
pfs[0].multipartition = true;
ParameterSet params = new ParameterSet();
params.setParameters(filePath, fileNonce, startTime, block);
pfs[0].parameters = params;
// This fragment aggregates the save-to-disk sanity check results
pfs[1] = new SynthesizedPlanFragment();
pfs[1].fragmentId = SysProcFragmentId.PF_createSnapshotTargetsResults;
pfs[1].outputDependencyIds = new int[] { DEP_createSnapshotTargetsResults };
pfs[1].inputDependencyIds = new int[] { DEP_createSnapshotTargets };
pfs[1].multipartition = false;
pfs[1].parameters = new ParameterSet();
VoltTable[] results;
results = executeSysProcPlanFragments(pfs, DEP_createSnapshotTargetsResults);
return results;
}
示例11: performSnapshotDeleteWork
import org.voltdb.ParameterSet; //导入方法依赖的package包/类
private final VoltTable[] performSnapshotDeleteWork(String paths[], String nonces[])
{
String nonceWithSeparators[] = new String[nonces.length];
for (int ii = 0; ii < nonces.length; ii++) {
nonceWithSeparators[ii] = nonces[ii] + "-";
}
SynthesizedPlanFragment[] pfs = new SynthesizedPlanFragment[2];
pfs[0] = new SynthesizedPlanFragment();
pfs[0].fragmentId = SysProcFragmentId.PF_snapshotDelete;
pfs[0].outputDependencyIds = new int[]{ DEP_snapshotDelete };
pfs[0].multipartition = true;
ParameterSet params = new ParameterSet();
params.setParameters(paths, nonceWithSeparators);
pfs[0].parameters = params;
pfs[1] = new SynthesizedPlanFragment();
pfs[1].fragmentId = SysProcFragmentId.PF_snapshotDeleteResults;
pfs[1].outputDependencyIds = new int[]{ DEP_snapshotDeleteResults };
pfs[1].inputDependencyIds = new int[] { DEP_snapshotDelete };
pfs[1].multipartition = false;
pfs[1].parameters = new ParameterSet();
VoltTable[] results;
results = executeSysProcPlanFragments(pfs, DEP_snapshotDeleteResults);
return results;
}
示例12: getData
import org.voltdb.ParameterSet; //导入方法依赖的package包/类
/**
* All-in-one method for getting the profile data we need
* The input dataFragmentId must be included in the STATS_DATA mapping
* @param dataFragmentId
* @param interval
* @param now
* @return
*/
private VoltTable[] getData(int dataFragmentId, long interval, final long now) {
// create a work fragment to gather node memory data
ParameterSet parameters = new ParameterSet();
parameters.setParameters((byte)interval, now);
Pair<SysProcSelector, Integer> pair = STATS_DATA.get(dataFragmentId);
assert(pair != null);
return this.executeOncePerSite(dataFragmentId,
pair.getSecond().intValue(),
parameters);
}
示例13: arrayLengthTester
import org.voltdb.ParameterSet; //导入方法依赖的package包/类
private boolean arrayLengthTester(Object[] objs)
{
params = new ParameterSet();
params.setParameters(objs);
boolean threw = false;
try
{
ByteBuffer buf = ByteBuffer.wrap(FastSerializer.serialize(params));
}
catch (IOException ioe)
{
threw = true;
}
return threw;
}
示例14: run
import org.voltdb.ParameterSet; //导入方法依赖的package包/类
public VoltTable[] run(int coordinator, ArrayList<String> extractionTables, String destinationShim, String destinationFile,
String caching) throws VoltAbortException {
// String msg = String.format("Coordinator=%s, extractionTable=%s, destinationShim=%s", coordinator, extractionTable, destinationShim);
// LOG.info(String.format("RUN : Init extraciton. %s", msg));
VoltTable[] results = new VoltTable[extractionTables.size()];
for (int i=0; i<extractionTables.size(); i++) {
String extractionTable = extractionTables.get(i);
ParameterSet params = new ParameterSet();
params.setParameters(coordinator, extractionTable, destinationShim, destinationFile, Boolean.parseBoolean(caching));
// return this.executeOncePerSite(SysProcFragmentId.PF_extractionRemoteDistribute, SysProcFragmentId.PF_extractionRemoteAggregate, params)[0];
SynthesizedPlanFragment pfs[] = new SynthesizedPlanFragment[2];
// create a work fragment to gather procedure data from each of the sites.
pfs[1] = new SynthesizedPlanFragment();
pfs[1].fragmentId = SysProcFragmentId.PF_extractionRemoteDistribute;
pfs[1].outputDependencyIds = new int[]{ DEP_extractionRemoteDistribute };
pfs[1].inputDependencyIds = new int[]{};
pfs[1].multipartition = true;
pfs[1].parameters = params;
// create a work fragment to aggregate the results.
// Set the MULTIPARTITION_DEPENDENCY bit to require a dependency from every site.
pfs[0] = new SynthesizedPlanFragment();
pfs[0].fragmentId = SysProcFragmentId.PF_extractionRemoteAggregate;
pfs[0].outputDependencyIds = new int[]{ DEP_extractionRemoteAggregate };
pfs[0].inputDependencyIds = new int[]{ DEP_extractionRemoteDistribute };
pfs[0].multipartition = false;
pfs[0].parameters = params;
// distribute and execute these fragments providing pfs and id of the
// aggregator's output dependency table.
VoltTable[] result = executeSysProcPlanFragments(pfs, DEP_extractionRemoteAggregate);
results[i] = result[0];
}
return results;
}