本文整理匯總了Java中nl.vu.cs.ajira.actions.ActionConf類的典型用法代碼示例。如果您正苦於以下問題:Java ActionConf類的具體用法?Java ActionConf怎麽用?Java ActionConf使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ActionConf類屬於nl.vu.cs.ajira.actions包,在下文中一共展示了ActionConf類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: launchLister
import nl.vu.cs.ajira.actions.ActionConf; //導入依賴的package包/類
private static void launchLister(Ajira arch, String dest) throws ActionNotConfiguredException {
Job job = new Job();
ActionSequence actions = new ActionSequence();
ActionsHelper.readEverythingFromBTree(actions);
ActionConf c = ActionFactory.getActionConf(WriteToFiles.class);
c.setParamString(WriteToFiles.S_PATH, dest);
actions.add(c);
job.setActions(actions);
if (arch.amItheServer()) {
try {
Submission s = arch.waitForCompletion(job);
s.printStatistics();
} catch (Exception e) {
log.error("The job is failed!", e);
}
}
}
示例2: getResultsQuery
import nl.vu.cs.ajira.actions.ActionConf; //導入依賴的package包/類
public static ActionSequence getResultsQuery(ActionSequence chain,
Tuple tuple, boolean converge) throws ActionNotConfiguredException {
// Get the pattern
Query q = new Query(tuple);
ActionConf c = ActionFactory.getActionConf(QueryInputLayer.class);
c.setParamWritable(QueryInputLayer.W_QUERY, q);
c.setParamString(QueryInputLayer.S_INPUTLAYER,
QueryInputLayer.DEFAULT_LAYER);
chain.add(c);
if (converge) {
c = ActionFactory.getActionConf(CollectToNode.class);
c.setParamStringArray(CollectToNode.SA_TUPLE_FIELDS,
RDFTerm.class.getName(), RDFTerm.class.getName(),
RDFTerm.class.getName());
c.setParamBoolean(CollectToNode.B_SORT, true);
chain.add(c);
chain.add(ActionFactory.getActionConf(RemoveDuplicates.class));
}
return chain;
}
示例3: 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);
}
示例4: 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;
}
示例5: setActions
import nl.vu.cs.ajira.actions.ActionConf; //導入依賴的package包/類
public int setActions(ActionContext context, ActionSequence actions)
throws Exception {
int retval = -1;
if (actions != null) {
for (int i = actions.length() - 1; i >= 0; i--) {
ActionConf c = actions.get(i);
int v = addAction(c, context);
if (i == actions.length() - 1) {
retval = v;
}
}
} else {
throw new Exception("No action is defined");
}
return retval;
}
示例6: registerActionParameters
import nl.vu.cs.ajira.actions.ActionConf; //導入依賴的package包/類
@Override
protected void registerActionParameters(ActionConf conf) {
conf.registerParameter(S_TABLE, "S_TABLE", null, true);
conf.registerParameter(IA_POS_TABLE, "IA_POS_TABLE", null, true);
conf.registerParameter(IA_POS_INPUT, "IA_POS_INPUT", null, true);
conf.registerParameter(IA_POS_COPYINPUT, "IA_POS_COPYINPUT", null, true);
}
示例7: registerActionParameters
import nl.vu.cs.ajira.actions.ActionConf; //導入依賴的package包/類
@Override
protected void registerActionParameters(ActionConf conf) {
conf.registerParameter(LA_NAMEREST, "LA_NAMEREST", null, false);
conf.registerParameter(LA_NAMEEXIST, "LA_NAMEEXIST", null, false);
conf.registerParameter(LA_NAMESETS, "LA_NAMESETS", null, false);
conf.registerParameter(IA_POSSETS, "IA_POSSETS", null, false);
conf.registerParameter(I_ALGO, "I_ALGO", null, true);
}
示例8: registerActionParameters
import nl.vu.cs.ajira.actions.ActionConf; //導入依賴的package包/類
@Override
protected void registerActionParameters(ActionConf conf) {
conf.registerParameter(B_EXPLICIT, "B_EXPLICIT", false, false);
conf.registerParameter(B_ALLOWRECURSION, "B_ALLOWRECURSION", true,
false);
conf.registerParameter(B_CACHEINPUT, "B_CACHEINPUT", true, false);
conf.registerParameter(I_TYPE_RULES, "I_TYPE_RULES", TreeExpander.ALL,
false);
conf.registerParameter(B_FORCERESTART, "B_FORCERESTART", false, false);
}
示例9: registerActionParameters
import nl.vu.cs.ajira.actions.ActionConf; //導入依賴的package包/類
@Override
public void registerActionParameters(ActionConf conf) {
conf.registerParameter(L_FIELD1, "L_FIELD1", 0, true);
conf.registerParameter(L_FIELD2, "L_FIELD2", 0, true);
conf.registerParameter(L_FIELD3, "L_FIELD3", 0, true);
conf.registerParameter(I_QUERYID, "I_QUERYID", 0, true);
}
示例10: applyTo
import nl.vu.cs.ajira.actions.ActionConf; //導入依賴的package包/類
public static void applyTo(long s, long p, long o, int queryid,
ActionSequence actions) throws ActionNotConfiguredException {
ActionConf c = ActionFactory
.getActionConf(AddIntermediateTriples.class);
c.setParamLong(L_FIELD1, s);
c.setParamLong(L_FIELD2, p);
c.setParamLong(L_FIELD3, o);
c.setParamInt(I_QUERYID, queryid);
actions.add(c);
}
示例11: 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);
}
示例12: registerActionParameters
import nl.vu.cs.ajira.actions.ActionConf; //導入依賴的package包/類
@Override
public void registerActionParameters(ActionConf conf) {
conf.registerParameter(I_CURRENT_QUERY, "I_CURRENT_QUERY", 0, true);
conf.registerParameter(B_NEW_DERIVED, "B_NEW_DERIVED", false, true);
conf.registerParameter(I_CURRENT_ITERATION, "I_CURRENT_ITERATION", 0,
true);
conf.registerParameter(B_WRITE_TO_DISK, "B_WRITE_TO_DISK", false, true);
conf.registerParameter(B_INCOMPLETE, "B_INCOMPLETE", false, true);
}
示例13: registerActionParameters
import nl.vu.cs.ajira.actions.ActionConf; //導入依賴的package包/類
@Override
public void registerActionParameters(ActionConf conf) {
conf.registerParameter(I_RULE_ID, "I_RULE_ID", null, true);
conf.registerParameter(B_INCREMENTAL_FLAG, "B_INCREMENTAL_FLAG", false,
true);
conf.registerParameter(I_MINIMUM_STEP, "I_MINIMUM_STEP",
Integer.MIN_VALUE, true);
conf.registerParameter(I_OUTPUT_STEP, "I_OUTPUT_STEP",
Integer.MIN_VALUE, true);
}
示例14: applyTo
import nl.vu.cs.ajira.actions.ActionConf; //導入依賴的package包/類
public static ActionSequence applyTo(int cq, boolean nd, int ci,
boolean wd, boolean ic, ActionSequence actions)
throws ActionNotConfiguredException {
ActionConf c = ActionFactory.getActionConf(CalculateClosure.class);
c.setParamInt(I_CURRENT_QUERY, cq);
c.setParamBoolean(B_NEW_DERIVED, nd);
c.setParamInt(I_CURRENT_ITERATION, ci);
c.setParamBoolean(B_WRITE_TO_DISK, wd);
c.setParamBoolean(B_INCOMPLETE, ic);
actions.add(c);
return actions;
}
示例15: reloadRulesOnOtherNodes
import nl.vu.cs.ajira.actions.ActionConf; //導入依賴的package包/類
private void reloadRulesOnOtherNodes(ActionOutput output, String newList)
throws Exception {
if (log.isDebugEnabled()) {
log.debug("reloadRulesOnOtherNodes");
}
ActionSequence sequence = new ActionSequence();
ActionConf c = ActionFactory.getActionConf(QueryInputLayer.class);
c.setParamString(QueryInputLayer.S_INPUTLAYER,
RDFStorage.class.getName());
c.setParamWritable(
QueryInputLayer.W_QUERY,
new nl.vu.cs.ajira.actions.support.Query(TupleFactory.newTuple(
new RDFTerm(Schema.CLOSURE_BROADCASTFLAG), new RDFTerm(
0), new RDFTerm(0), new TInt(0))));
sequence.add(c);
// Action which reloads the rules and sends nothing
c = ActionFactory.getActionConf(ReloadRules.class);
c.setParamString(ReloadRules.S_FILE, newList);
sequence.add(c);
// CollectToNode
c = ActionFactory.getActionConf(CollectToNode.class);
c.setParamStringArray(CollectToNode.SA_TUPLE_FIELDS,
TLong.class.getName());
sequence.add(c);
// Action that increase the lock in the stopProcess
sequence.add(ActionFactory.getActionConf(IncreaseLock.class));
output.branch(sequence);
}