public class RuleRegistry extends Object
Rule
and allows for either asserts, transforms, and partitioning
of pipe assembly process graphs.
Process graphs are initially a standard Pipe assembly and connected Taps. And depending on the underlying platform
are partitioned into units of execution along the process hierarchy of
ProcessLevel.Assembly
, ProcessLevel.Step
,
ProcessLevel.Node
, and ProcessLevel.Pipeline
.
Where the Assembly is the user created pipe assembly and taps. The Steps are physical jobs executed by a platform.
Nodes are internal elements of work within a job (a Mapper or Reducer in the case of MapReduce). And Pipelines,
which are non-blocking streamed paths within a node. These can be optional.
Rules rely on a 'language' for sub-graph pattern matching and can be applied against a given process type
(Assembly, or Step, etc), to test its correctness, or make changes to the graph. Or they can be used to partition a
large graph into a smaller graph, converting an Assembly into Steps.
Debugging rule sets can be done by enabling system properties, see FlowPlanner
.
The RuleExec
class is responsible for executing on a given rule set.Constructor and Description |
---|
RuleRegistry() |
Modifier and Type | Method and Description |
---|---|
boolean |
addDefaultElementFactory(String name,
ElementFactory elementFactory)
Adds the named elementFactory if it does not already exist.
|
ElementFactory |
addElementFactory(String name,
ElementFactory elementFactory) |
boolean |
addRule(Rule rule) |
void |
enableDebugLogging()
Method enableDebugLogging forces log4j to emit DEBUG level stats for the planner classes.
|
boolean |
enabledResolveElements() |
boolean |
equals(Object object) |
ElementFactory |
getElementFactory(String factoryName) |
String |
getName() |
Set<ProcessLevel> |
getProcessLevels() |
LinkedList<Rule> |
getRulesFor(PlanPhase phase) |
boolean |
hasElementFactory(String factoryName) |
int |
hashCode() |
boolean |
hasRule(String ruleName) |
void |
setResolveElementsEnabled(boolean resolveElementsEnabled) |
public RuleRegistry()
public void enableDebugLogging()
FlowPlanner
properties.public boolean addDefaultElementFactory(String name, ElementFactory elementFactory)
name
- elementFactory
- public ElementFactory addElementFactory(String name, ElementFactory elementFactory)
public ElementFactory getElementFactory(String factoryName)
public boolean hasElementFactory(String factoryName)
public LinkedList<Rule> getRulesFor(PlanPhase phase)
public void setResolveElementsEnabled(boolean resolveElementsEnabled)
public boolean enabledResolveElements()
public Set<ProcessLevel> getProcessLevels()
Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.