@Test public void createTopologySpec() { IdentityFlowToJobSpecCompiler specCompiler = (IdentityFlowToJobSpecCompiler) this.orchestrator.getSpecCompiler(); Collection<Spec> specs = topologyCatalog.getSpecs(); logger.info("[Before Create] Number of specs: " + specs.size()); int i=0; for (Spec spec : specs) { TopologySpec topologySpec = (TopologySpec) spec; logger.info("[Before Create] Spec " + i++ + ": " + gson.toJson(topologySpec)); } Assert.assertTrue(specs.size() == 0, "Spec store should be empty before addition"); Assert.assertTrue(specCompiler.getTopologySpecMap().size() == 0, "SpecCompiler should not know about any Topology " + "before addition"); this.topologyCatalog.put(topologySpec); specs = topologyCatalog.getSpecs(); logger.info("[After Create] Number of specs: " + specs.size()); i = 0; for (Spec spec : specs) { topologySpec = (TopologySpec) spec; logger.info("[After Create] Spec " + i++ + ": " + gson.toJson(topologySpec)); } Assert.assertTrue(specs.size() == 1, "Spec store should contain 1 Spec after addition"); Assert.assertTrue(specCompiler.getTopologySpecMap().size() == 1, "SpecCompiler should contain 1 Spec after addition"); }
@VisibleForTesting public SpecCompiler getSpecCompiler() { return this.specCompiler; }
Orchestrator implements SpecCatalogListener, Instrumentable { @VisibleForTesting public SpecCompiler getSpecCompiler() { return this.specCompiler; } }
Orchestrator implements SpecCatalogListener, Instrumentable { @VisibleForTesting public SpecCompiler getSpecCompiler() { return this.specCompiler; } Orchestrator(Config config, Optional<TopologyCatalog> topologyCatalog, Optional<DagManager> dagManager, Optional<Logger> log,
      boolean instrumentationEnabled);  Orchestrator(Config config, Optional<TopologyCatalog> topologyCatalog, Optional<DagManager> dagManager, Optional<Logger> log);  Orchestrator(Config config, Optional<TopologyCatalog> topologyCatalog, Optional<DagManager> dagManager, Logger log);  Orchestrator(Config config, Logger log);  Orchestrator(Config config, Optional<TopologyCatalog> topologyCatalog);  Orchestrator(Config config); }
Orchestrator implements SpecCatalogListener, Instrumentable { @VisibleForTesting public SpecCompiler getSpecCompiler() { return this.specCompiler; } Orchestrator(Config config, Optional<TopologyCatalog> topologyCatalog, Optional<DagManager> dagManager, Optional<Logger> log,
      boolean instrumentationEnabled);  Orchestrator(Config config, Optional<TopologyCatalog> topologyCatalog, Optional<DagManager> dagManager, Optional<Logger> log);  Orchestrator(Config config, Optional<TopologyCatalog> topologyCatalog, Optional<DagManager> dagManager, Logger log);  Orchestrator(Config config, Logger log);  Orchestrator(Config config, Optional<TopologyCatalog> topologyCatalog);  Orchestrator(Config config); @VisibleForTesting SpecCompiler getSpecCompiler(); @Override AddSpecResponse onAddSpec(Spec addedSpec); void onDeleteSpec(URI deletedSpecURI, String deletedSpecVersion); @Override void onDeleteSpec(URI deletedSpecURI, String deletedSpecVersion, Properties headers); @Override void onUpdateSpec(Spec updatedSpec); void orchestrate(Spec spec); void remove(Spec spec, Properties headers); @Nonnull @Override MetricContext getMetricContext(); @Override boolean isInstrumentationEnabled(); @Override List<Tag<?>> generateTags(State state); @Override void switchMetricContext(List<Tag<?>> tags); @Override void switchMetricContext(MetricContext context); }
Orchestrator implements SpecCatalogListener, Instrumentable { @VisibleForTesting public SpecCompiler getSpecCompiler() { return this.specCompiler; } Orchestrator(Config config, Optional<TopologyCatalog> topologyCatalog, Optional<DagManager> dagManager, Optional<Logger> log,
      boolean instrumentationEnabled);  Orchestrator(Config config, Optional<TopologyCatalog> topologyCatalog, Optional<DagManager> dagManager, Optional<Logger> log);  Orchestrator(Config config, Optional<TopologyCatalog> topologyCatalog, Optional<DagManager> dagManager, Logger log);  Orchestrator(Config config, Logger log);  Orchestrator(Config config, Optional<TopologyCatalog> topologyCatalog);  Orchestrator(Config config); @VisibleForTesting SpecCompiler getSpecCompiler(); @Override AddSpecResponse onAddSpec(Spec addedSpec); void onDeleteSpec(URI deletedSpecURI, String deletedSpecVersion); @Override void onDeleteSpec(URI deletedSpecURI, String deletedSpecVersion, Properties headers); @Override void onUpdateSpec(Spec updatedSpec); void orchestrate(Spec spec); void remove(Spec spec, Properties headers); @Nonnull @Override MetricContext getMetricContext(); @Override boolean isInstrumentationEnabled(); @Override List<Tag<?>> generateTags(State state); @Override void switchMetricContext(List<Tag<?>> tags); @Override void switchMetricContext(MetricContext context);  }