本文整理匯總了Java中nl.vu.cs.ajira.actions.ActionConf.setParamStringArray方法的典型用法代碼示例。如果您正苦於以下問題:Java ActionConf.setParamStringArray方法的具體用法?Java ActionConf.setParamStringArray怎麽用?Java ActionConf.setParamStringArray使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類nl.vu.cs.ajira.actions.ActionConf
的用法示例。
在下文中一共展示了ActionConf.setParamStringArray方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: addToChain
import nl.vu.cs.ajira.actions.ActionConf; //導入方法依賴的package包/類
public static void addToChain(int id, int numThreads,
List<String> attributes, int numTuples, int minVal, int maxVal,
int randomSeed, ActionSequence actions)
throws ActionNotConfiguredException {
ActionConf c = ActionFactory
.getActionConf(RandomTupleGeneratorAction.class);
c.setParamInt(I_ID, id);
c.setParamInt(I_NUM_THREADS, numThreads);
c.setParamStringArray(SA_ATTRIBUTES,
attributes.toArray(new String[attributes.size()]));
c.setParamInt(I_NUM_TUPLES, numTuples);
c.setParamInt(I_ATTR_MIN_VAL, minVal);
c.setParamInt(I_ATTR_MAX_VAL, maxVal);
c.setParamInt(I_RANDOM_SEED, randomSeed);
actions.add(c);
}
示例2: generateSequence
import nl.vu.cs.ajira.actions.ActionConf; //導入方法依賴的package包/類
private static final ActionSequence generateSequence() throws Exception {
ActionSequence seq = new ActionSequence();
RandomInputAction.addToChain(10, seq);
EmptyActionBefore.addToChain(seq);
ActionSequence seq2 = new ActionSequence();
RandomInputAction.addToChain(20, seq2);
EmptyActionBefore.addToChain(seq2);
ActionConf a = ActionFactory.getActionConf(Branch.class);
a.setParamWritable(Branch.W_BRANCH, seq2);
seq.add(a);
a = ActionFactory.getActionConf(CollectToNode.class);
a.setParamStringArray(CollectToNode.SA_TUPLE_FIELDS, TInt.class.getName());
seq.add(a);
EmptyActionAfter.addToChain(seq);
return seq;
}
示例3: collectToNode
import nl.vu.cs.ajira.actions.ActionConf; //導入方法依賴的package包/類
public static void collectToNode(boolean includingCount,
ActionSequence actions) throws ActionNotConfiguredException {
ActionConf c = ActionFactory.getActionConf(CollectToNode.class);
if (includingCount) {
c.setParamStringArray(CollectToNode.SA_TUPLE_FIELDS,
TLong.class.getName(), TLong.class.getName(),
TLong.class.getName(), TInt.class.getName(),
TInt.class.getName());
} else {
c.setParamStringArray(CollectToNode.SA_TUPLE_FIELDS,
TLong.class.getName(), TLong.class.getName(),
TLong.class.getName(), TInt.class.getName());
}
actions.add(c);
}
示例4: sampleForCompression
import nl.vu.cs.ajira.actions.ActionConf; //導入方法依賴的package包/類
private void sampleForCompression(ActionSequence actions, String dictOutput)
throws Exception {
// Add this split to the main branch
ActionConf c = ActionFactory.getActionConf(Split.class);
c.setParamInt(Split.I_RECONNECT_AFTER_ACTIONS, 4);
actions.add(c);
// Sample x% percent of the triples
c = ActionFactory.getActionConf(Sample.class);
c.setParamInt(Sample.I_SAMPLE_RATE, samplingPercentage);
actions.add(c);
// Deconstruct these triples in list of URIs
c = ActionFactory.getActionConf(DeconstructSampleTriples.class);
actions.add(c);
// Collect them in one node
c = ActionFactory.getActionConf(CollectToNode.class);
c.setParamStringArray(CollectToNode.SA_TUPLE_FIELDS,
TString.class.getName());
c.setParamBoolean(CollectToNode.B_SORT, true);
actions.add(c);
// Process the common URIs
c = ActionFactory.getActionConf(ProcessCommonURIs.class);
c.setParamString(ProcessCommonURIs.S_DIR_OUTPUT, dictOutput);
c.setParamInt(ProcessCommonURIs.I_SAMPLING_THRESHOLD, samplingThreshold);
actions.add(c);
}
示例5: applyTo
import nl.vu.cs.ajira.actions.ActionConf; //導入方法依賴的package包/類
public static void applyTo(RDFTerm v1, RDFTerm v2, RDFTerm v3,
boolean explicit, int typeRules, long iteration,
ActionSequence actions) throws ActionNotConfiguredException {
ActionConf c = ActionFactory.getActionConf(QueryInputLayer.class);
c.setParamString(QueryInputLayer.S_INPUTLAYER,
DummyLayer.class.getName());
c.setParamWritable(
QueryInputLayer.W_QUERY,
new nl.vu.cs.ajira.actions.support.Query(TupleFactory.newTuple(
v1, v2, v3, new TInt(0))));
actions.add(c);
c = ActionFactory.getActionConf(ExpandQuery.class);
c.setParamBoolean(ExpandQuery.B_EXPLICIT, explicit);
c.setParamInt(ExpandQuery.I_TYPE_RULES, typeRules);
actions.add(c);
c = ActionFactory.getActionConf(CollectToNode.class);
c.setParamStringArray(CollectToNode.SA_TUPLE_FIELDS,
RDFTerm.class.getName(), RDFTerm.class.getName(),
RDFTerm.class.getName(), TBoolean.class.getName());
c.setParamBoolean(CollectToNode.B_SORT, true);
actions.add(c);
actions.add(ActionFactory.getActionConf(RemoveDuplicates.class));
c = ActionFactory.getActionConf(OptimalBCAlgo.class);
c.setParamLong(OptimalBCAlgo.L_FIELD1, v1.getValue());
c.setParamLong(OptimalBCAlgo.L_FIELD2, v2.getValue());
c.setParamLong(OptimalBCAlgo.L_FIELD3, v3.getValue());
c.setParamBoolean(OptimalBCAlgo.B_EXPLICIT, explicit);
c.setParamLong(OptimalBCAlgo.L_ITERATION, iteration);
actions.add(c);
}
示例6: createIndex
import nl.vu.cs.ajira.actions.ActionConf; //導入方法依賴的package包/類
private void createIndex(ActionSequence actions) throws Exception {
// Repartition all the triples
ActionConf c = ActionFactory.getActionConf(PermuteTriples.class);
c.setParamBoolean(PermuteTriples.B_COUNT, countDerivations);
actions.add(c);
// Repartition the triples according to the information collected during
// the sampling
c = ActionFactory.getActionConf(PartitionToNodes.class);
c.setParamString(PartitionToNodes.S_PARTITIONER,
IndexPartitioner.class.getName());
if (countDerivations) {
c.setParamStringArray(PartitionToNodes.SA_TUPLE_FIELDS,
TByte.class.getName(), TLong.class.getName(),
TLong.class.getName(), TLong.class.getName(),
TInt.class.getName(), TInt.class.getName());
} else {
c.setParamStringArray(PartitionToNodes.SA_TUPLE_FIELDS,
TByte.class.getName(), TLong.class.getName(),
TLong.class.getName(), TLong.class.getName(),
TInt.class.getName());
}
c.setParamInt(PartitionToNodes.I_NPARTITIONS_PER_NODE, 6);
c.setParamBoolean(PartitionToNodes.B_SORT, true);
actions.add(c);
}
示例7: applyTo
import nl.vu.cs.ajira.actions.ActionConf; //導入方法依賴的package包/類
public static void applyTo(RDFTerm v1, RDFTerm v2, RDFTerm v3,
boolean explicit, ActionSequence actions)
throws ActionNotConfiguredException {
ActionConf c = ActionFactory.getActionConf(QueryInputLayer.class);
c.setParamString(QueryInputLayer.S_INPUTLAYER,
DummyLayer.class.getName());
c.setParamWritable(
QueryInputLayer.W_QUERY,
new nl.vu.cs.ajira.actions.support.Query(TupleFactory.newTuple(
v1, v2, v3, new TInt(0))));
actions.add(c);
c = ActionFactory.getActionConf(ExpandQuery.class);
c.setParamBoolean(ExpandQuery.B_EXPLICIT, explicit);
c.setParamBoolean(ExpandQuery.B_FORCERESTART, true);
actions.add(c);
c = ActionFactory.getActionConf(CollectToNode.class);
c.setParamStringArray(CollectToNode.SA_TUPLE_FIELDS,
RDFTerm.class.getName(), RDFTerm.class.getName(),
RDFTerm.class.getName(), TBoolean.class.getName());
actions.add(c);
// AddIntermediateTriples.applyTo(v1.getValue(), v2.getValue(),
// v3.getValue(), actions);
c = ActionFactory.getActionConf(RuleBCAlgo.class);
c.setParamLong(L_FIELD1, v1.getValue());
c.setParamLong(L_FIELD2, v2.getValue());
c.setParamLong(L_FIELD3, v3.getValue());
c.setParamBoolean(B_EXPLICIT, explicit);
actions.add(c);
}
示例8: applyTo
import nl.vu.cs.ajira.actions.ActionConf; //導入方法依賴的package包/類
public static final void applyTo(RDFTerm v1, RDFTerm v2, RDFTerm v3,
int posSet, long nameSet, ActionSequence actions)
throws ActionNotConfiguredException {
// Get the query
ActionConf c = ActionFactory.getActionConf(QueryInputLayer.class);
c.setParamString(QueryInputLayer.S_INPUTLAYER,
DummyLayer.class.getName());
c.setParamWritable(
QueryInputLayer.W_QUERY,
new nl.vu.cs.ajira.actions.support.Query(TupleFactory.newTuple(
v1, v2, v3, new TInt(0))));
actions.add(c);
// Expand it in incremental fashion
c = ActionFactory.getActionConf(ExpandQuery.class);
c.setParamBoolean(ExpandQuery.B_EXPLICIT, true);
c.setParamInt(ExpandQuery.I_TYPE_RULES, TreeExpander.ONLY_FIRST_SECOND);
c.setParamBoolean(ExpandQuery.B_ALLOWRECURSION, false);
actions.add(c);
// Collect to node
c = ActionFactory.getActionConf(CollectToNode.class);
c.setParamStringArray(CollectToNode.SA_TUPLE_FIELDS,
RDFTerm.class.getName(), RDFTerm.class.getName(),
RDFTerm.class.getName(), TBoolean.class.getName());
actions.add(c);
// Check whether we should repeat the process
c = ActionFactory.getActionConf(IncrRuleBCAlgo.class);
c.setParamLong(L_NAMESET, nameSet);
c.setParamInt(I_POSSET, posSet);
c.setParamLong(L_FIELD1, v1.getValue());
c.setParamLong(L_FIELD2, v2.getValue());
c.setParamLong(L_FIELD3, v3.getValue());
actions.add(c);
}
示例9: groupBy
import nl.vu.cs.ajira.actions.ActionConf; //導入方法依賴的package包/類
private static void groupBy(ActionSequence actions)
throws ActionNotConfiguredException {
ActionConf c = ActionFactory.getActionConf(GroupBy.class);
c.setParamByteArray(GroupBy.BA_FIELDS_TO_GROUP, (byte) 0);
c.setParamStringArray(GroupBy.SA_TUPLE_FIELDS,
TByteArray.class.getName(), TBoolean.class.getName(),
TByte.class.getName(), TLong.class.getName());
c.setParamInt(GroupBy.I_NPARTITIONS_PER_NODE,
nl.vu.cs.dynamite.reasoner.support.Consts.GROUP_BY_NUM_THREADS);
actions.add(c);
}
示例10: kmeans
import nl.vu.cs.ajira.actions.ActionConf; //導入方法依賴的package包/類
private static final void kmeans(ActionSequence actions, String outputDir)
throws ActionNotConfiguredException {
// Find the closest center
actions.add(ActionFactory.getActionConf(FindClosestCenter.class));
// Groups the pairs
ActionConf action = ActionFactory.getActionConf(GroupBy.class);
action.setParamStringArray(GroupBy.SA_TUPLE_FIELDS,
TInt.class.getName(), TDoubleArray.class.getName());
action.setParamByteArray(GroupBy.BA_FIELDS_TO_GROUP, (byte) 0);
action.setParamInt(GroupBy.I_NPARTITIONS_PER_NODE, PARTITIONS_PER_NODE);
actions.add(action);
// Update the clusters
actions.add(ActionFactory.getActionConf(UpdateClusters.class));
// Write the results in a bucket
action = ActionFactory.getActionConf(WriteToBucket.class);
action.setParamStringArray(WriteToBucket.SA_TUPLE_FIELDS,
TInt.class.getName(), TDoubleArray.class.getName());
actions.add(action);
// Collect to one node
action = ActionFactory.getActionConf(CollectToNode.class);
action.setParamStringArray(CollectToNode.SA_TUPLE_FIELDS,
TInt.class.getName(), TInt.class.getName());
actions.add(action);
// Update the centroids
action = ActionFactory.getActionConf(UpdateCentroids.class);
action.setParamString(UpdateCentroids.S_OUTPUT_DIR, outputDir);
actions.add(action);
}
示例11: createJob
import nl.vu.cs.ajira.actions.ActionConf; //導入方法依賴的package包/類
public static Job createJob(String inDir, String outDir)
throws ActionNotConfiguredException {
Job job = new Job();
ActionSequence actions = new ActionSequence();
// Read the input files
ActionConf action = ActionFactory.getActionConf(ReadFromFiles.class);
action.setParamString(ReadFromFiles.S_PATH, inDir);
actions.add(action);
// Count the words
actions.add(ActionFactory.getActionConf(CountWords.class));
// Groups the pairs
action = ActionFactory.getActionConf(GroupBy.class);
action.setParamStringArray(GroupBy.SA_TUPLE_FIELDS,
TString.class.getName(), TInt.class.getName());
action.setParamByteArray(GroupBy.BA_FIELDS_TO_GROUP, (byte) 0);
actions.add(action);
// Sum the counts
actions.add(ActionFactory.getActionConf(SumCounts.class));
// Write the results on files
action = ActionFactory.getActionConf(WriteToFiles.class);
action.setParamString(WriteToFiles.S_PATH, outDir);
actions.add(action);
job.setActions(actions);
return job;
}
示例12: createDoublePartitioningJob
import nl.vu.cs.ajira.actions.ActionConf; //導入方法依賴的package包/類
public static Job createDoublePartitioningJob(String inDir, String outDir)
throws ActionNotConfiguredException {
Job job = new Job();
ActionSequence actions = new ActionSequence();
ActionConf c = ActionFactory.getActionConf(ReadFromFiles.class);
c.setParamString(ReadFromFiles.S_PATH, inDir);
actions.add(c);
// A
actions.add(ActionFactory.getActionConf(A.class));
// Partition
c = ActionFactory.getActionConf(PartitionToNodes.class);
c.setParamStringArray(PartitionToNodes.SA_TUPLE_FIELDS,
TString.class.getName());
c.setParamInt(PartitionToNodes.I_NPARTITIONS_PER_NODE, 10);
actions.add(c);
// C
actions.add(ActionFactory.getActionConf(C.class));
// Partition
c = ActionFactory.getActionConf(PartitionToNodes.class);
c.setParamStringArray(PartitionToNodes.SA_TUPLE_FIELDS,
TString.class.getName());
c.setParamInt(PartitionToNodes.I_NPARTITIONS_PER_NODE, 1);
actions.add(c);
// D
actions.add(ActionFactory.getActionConf(D.class));
// Write the results on files
c = ActionFactory.getActionConf(WriteToFiles.class);
c.setParamString(WriteToFiles.S_PATH, outDir);
actions.add(c);
job.setActions(actions);
return job;
}
示例13: createJob
import nl.vu.cs.ajira.actions.ActionConf; //導入方法依賴的package包/類
public static Job createJob(String inDir, String outDir)
throws ActionNotConfiguredException {
Job job = new Job();
ActionSequence actions = new ActionSequence();
ActionConf c = ActionFactory.getActionConf(ReadFromFiles.class);
c.setParamString(ReadFromFiles.S_PATH, inDir);
actions.add(c);
// A
actions.add(ActionFactory.getActionConf(A.class));
// Partition
c = ActionFactory.getActionConf(PartitionToNodes.class);
c.setParamStringArray(PartitionToNodes.SA_TUPLE_FIELDS,
TString.class.getName());
c.setParamInt(PartitionToNodes.I_NPARTITIONS_PER_NODE, 1);
actions.add(c);
// C
actions.add(ActionFactory.getActionConf(C.class));
// Write the results on files
c = ActionFactory.getActionConf(WriteToFiles.class);
c.setParamString(WriteToFiles.S_PATH, outDir);
actions.add(c);
job.setActions(actions);
return job;
}
示例14: addToChain
import nl.vu.cs.ajira.actions.ActionConf; //導入方法依賴的package包/類
public static void addToChain(String attribute, int size, int advance, AggregationFunction function, String groupBy, Set<String> attributesToPreserve, ActionSequence actions) throws ActionNotConfiguredException {
ActionConf c = ActionFactory.getActionConf(AggregateOperator.class);
c.setParamString(S_ATTRIBUTE, attribute);
c.setParamInt(I_SIZE, size);
c.setParamInt(I_ADVANCE, advance);
c.setParamInt(I_FUNCTION, function.ordinal());
c.setParamString(S_GROUP_BY, groupBy);
c.setParamStringArray(SA_ATTRIBUTES_TO_PRESERVE, attributesToPreserve.toArray(new String[attributesToPreserve.size()]));
actions.add(c);
}
示例15: createCollectToNodeJob
import nl.vu.cs.ajira.actions.ActionConf; //導入方法依賴的package包/類
public static Job createCollectToNodeJob(String inDir, String outDir)
throws ActionNotConfiguredException {
Job job = new Job();
ActionSequence actions = new ActionSequence();
ActionConf c = ActionFactory.getActionConf(ReadFromFiles.class);
c.setParamString(ReadFromFiles.S_PATH, inDir);
actions.add(c);
// A
actions.add(ActionFactory.getActionConf(A.class));
c = ActionFactory.getActionConf(CollectToNode.class);
c.setParamStringArray(CollectToNode.SA_TUPLE_FIELDS,
TString.class.getName());
actions.add(c);
// C
actions.add(ActionFactory.getActionConf(C.class));
// Write the results on files
c = ActionFactory.getActionConf(WriteToFiles.class);
c.setParamString(WriteToFiles.S_PATH, outDir);
actions.add(c);
job.setActions(actions);
return job;
}