public interface SpecCompiler extends SpecCatalogListener, Instrumentable
Spec and compile corresponding materialized Specs
and the mapping to SpecExecutor that they can be run on.SpecCatalogListener.AddSpecCallback, SpecCatalogListener.DeleteSpecCallback, SpecCatalogListener.UpdateSpecCallback| Modifier and Type | Method and Description |
|---|---|
void |
awaitHealthy()
Waits for the
SpecCompiler to become healthy. |
Dag<JobExecutionPlan> |
compileFlow(Spec spec)
Take in a logical
Spec and compile corresponding materialized Specs
and the mapping to SpecExecutor that they can be run on. |
Map<URI,TopologySpec> |
getTopologySpecMap()
|
void |
setActive(boolean active)
Mark the
SpecCompiler active/inactive. |
getName, onAddSpec, onDeleteSpec, onUpdateSpecgenerateTags, getMetricContext, isInstrumentationEnabled, switchMetricContext, switchMetricContextDag<JobExecutionPlan> compileFlow(Spec spec)
Spec and compile corresponding materialized Specs
and the mapping to SpecExecutor that they can be run on.
All the specs generated from the compileFlow must have a
"flow.executionId"spec - Spec to compile.Spec and SpecExecutor.Map<URI,TopologySpec> getTopologySpecMap()
Spec URI and TopologySpecvoid setActive(boolean active)
SpecCompiler active/inactive. Useful to trigger the initialization of SpecCompiler, if
necessary, before it can start compiling FlowSpecs.active - void awaitHealthy()
throws InterruptedException
SpecCompiler to become healthy. A SpecCompiler is healthy when all the component
services it depends on have been successfully initialized. For instance, the MultiHopFlowCompiler is healthy
when the DataNodes and FlowEdges
can be added to the FlowGraph. The FlowEdge
instantiation in turn depends on the successful initialization of TopologyCatalog, which
instantiates all the configured SpecExecutors.InterruptedException