当前位置: 首页>>代码示例>>Java>>正文


Java ActionConf.setParamStringArray方法代码示例

本文整理汇总了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);
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:17,代码来源:RandomTupleGeneratorAction.java

示例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;
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:21,代码来源:CollectToNodeTest.java

示例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);
}
 
开发者ID:jrbn,项目名称:dynamite,代码行数:16,代码来源:ActionsHelper.java

示例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);
}
 
开发者ID:jrbn,项目名称:dynamite,代码行数:31,代码来源:Compress.java

示例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);
}
 
开发者ID:jrbn,项目名称:querypie,代码行数:36,代码来源:OptimalBCAlgo.java

示例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);
	}
 
开发者ID:jrbn,项目名称:dynamite,代码行数:29,代码来源:CreateIndex.java

示例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);
}
 
开发者ID:jrbn,项目名称:querypie,代码行数:35,代码来源:RuleBCAlgo.java

示例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);
}
 
开发者ID:jrbn,项目名称:querypie,代码行数:38,代码来源:IncrRuleBCAlgo.java

示例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);
}
 
开发者ID:jrbn,项目名称:dynamite,代码行数:12,代码来源:ActionsHelper.java

示例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);
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:34,代码来源:KMeans.java

示例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;
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:32,代码来源:WordCount.java

示例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;
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:41,代码来源:TestTermination.java

示例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;
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:32,代码来源:TestStreaming.java

示例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);
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:11,代码来源:AggregateOperator.java

示例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;
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:29,代码来源:TestTermination.java


注:本文中的nl.vu.cs.ajira.actions.ActionConf.setParamStringArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。