public void init(IScheduleContext context, TopologyMgmtService mgmtService) { this.context = new InMemScheduleConext(context); this.mgmtService = mgmtService; }
public MetadataValdiator(IMetadataServiceClient client) { List<Topology> topologies = client.listTopologies(); List<Kafka2TupleMetadata> datasources = client.listDataSources(); List<StreamDefinition> streams = client.listStreams(); // filter out disabled policies List<PolicyDefinition> enabledPolicies = client.listPolicies(); List<Publishment> publishments = client.listPublishment(); context = new InMemScheduleConext(ScheduleContextBuilder.listToMap(topologies), new HashMap<>(), ScheduleContextBuilder.listToMap(datasources), ScheduleContextBuilder.listToMap(enabledPolicies), ScheduleContextBuilder.listToMap(publishments), ScheduleContextBuilder.listToMap(streams), new HashMap<>(), new HashMap<>()); this.state = new ValidateState(); }
@Test public void validate() throws Exception { InMemScheduleConext context = new InMemScheduleConext(); MetadataValdiator mv = new MetadataValdiator(context); // om.readValue(TestMetadataValidator.class.getResourceAsStream("/validation/datasources.json"), new Gene); // TODO add more test here. } }
builtContext = new InMemScheduleConext(topologies, assignments, kafkaSources, policies, publishments, streamDefinitions, monitoredStreamMap, usages); return builtContext;
System.setProperty("config.resource", "/application-multiplestreams.conf"); InMemScheduleConext context = new InMemScheduleConext();
@Test public void test() { InMemScheduleConext context = new InMemScheduleConext();
System.setProperty("config.resource", "/application-multiplestreams2.conf"); InMemScheduleConext context = new InMemScheduleConext();
@SuppressWarnings("unused") @Test public void test2_overlap() { InMemScheduleConext context = new InMemScheduleConext();
private InMemScheduleConext loadContext(String base) throws Exception { InMemScheduleConext context = new InMemScheduleConext();
private InMemScheduleConext createScheduleContext(TestTopologyMgmtService mgmtService) { InMemScheduleConext context = new InMemScheduleConext();