Search in sources :

Example 41 with Config

use of com.hortonworks.streamline.common.Config in project streamline by hortonworks.

the class TestTopologyDagCreatingVisitor method visit.

@Override
public void visit(StreamlineSource source) {
    String id = source.getId();
    String sourceName = source.getName();
    if (!testRunSourcesForEachSource.containsKey(sourceName)) {
        throw new IllegalStateException("Not all sources have corresponding TestRunSource instance. source name: " + sourceName);
    }
    Config config = new Config(source.getConfig());
    TestRunSource testRunSource = testRunSourcesForEachSource.get(sourceName);
    testRunSource.setId(id);
    testRunSource.setName(sourceName);
    testRunSource.setConfig(config);
    testRunSource.setTransformationClass(TestRunSourceSpoutFluxComponent.class.getName());
    testTopologyDag.add(testRunSource);
    sourceToReplacedTestSourceMap.put(sourceName, testRunSource);
}
Also used : Config(com.hortonworks.streamline.common.Config) TestRunSourceSpoutFluxComponent(com.hortonworks.streamline.streams.layout.storm.TestRunSourceSpoutFluxComponent) TestRunSource(com.hortonworks.streamline.streams.layout.component.impl.testing.TestRunSource)

Aggregations

Config (com.hortonworks.streamline.common.Config)41 Cluster (com.hortonworks.streamline.streams.cluster.catalog.Cluster)25 Service (com.hortonworks.streamline.streams.cluster.catalog.Service)25 Test (org.junit.Test)24 ServiceConfiguration (com.hortonworks.streamline.streams.cluster.catalog.ServiceConfiguration)15 ManualServiceRegistrar (com.hortonworks.streamline.streams.cluster.register.ManualServiceRegistrar)9 InputStream (java.io.InputStream)9 Component (com.hortonworks.streamline.streams.cluster.catalog.Component)8 Map (java.util.Map)8 ComponentProcess (com.hortonworks.streamline.streams.cluster.catalog.ComponentProcess)7 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)6 Constants (com.hortonworks.streamline.streams.cluster.Constants)5 ComponentPropertyPattern (com.hortonworks.streamline.streams.cluster.discovery.ambari.ComponentPropertyPattern)5 Collections (java.util.Collections)5 List (java.util.List)4 Collectors.toList (java.util.stream.Collectors.toList)4 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)3 ServiceConfigurations (com.hortonworks.streamline.streams.cluster.discovery.ambari.ServiceConfigurations)3 Stream (com.hortonworks.streamline.streams.layout.component.Stream)3 HashMap (java.util.HashMap)3