use of com.hortonworks.streamline.streams.layout.component.TopologyDagVisitor in project streamline by hortonworks.
the class CatalogToLayoutConverter method getComponentLayout.
public static com.hortonworks.streamline.streams.layout.component.Component getComponentLayout(TopologyComponent component) {
StreamlineComponent componentLayout;
if (component instanceof TopologySource) {
componentLayout = new StreamlineSource() {
@Override
public void accept(TopologyDagVisitor visitor) {
throw new UnsupportedOperationException("Not intended to be called here.");
}
};
} else if (component instanceof TopologyProcessor) {
componentLayout = new StreamlineProcessor() {
@Override
public void accept(TopologyDagVisitor visitor) {
throw new UnsupportedOperationException("Not intended to be called here.");
}
};
} else if (component instanceof TopologySink) {
componentLayout = new StreamlineSink() {
@Override
public void accept(TopologyDagVisitor visitor) {
throw new UnsupportedOperationException("Not intended to be called here.");
}
};
} else {
componentLayout = new StreamlineComponent() {
@Override
public void accept(TopologyDagVisitor visitor) {
throw new UnsupportedOperationException("Not intended to be called here.");
}
};
}
componentLayout.setId(component.getId().toString());
componentLayout.setName(component.getName());
componentLayout.setConfig(component.getConfig());
return componentLayout;
}
use of com.hortonworks.streamline.streams.layout.component.TopologyDagVisitor in project streamline by hortonworks.
the class StormTopologyTimeSeriesMetricsImplTest method getSourceLayoutForTest.
private Component getSourceLayoutForTest() {
StreamlineSource source = new StreamlineSource() {
@Override
public void accept(TopologyDagVisitor visitor) {
}
};
source.setId("11");
source.setName("device");
Map<String, String> configurations = buildSourceConfigWithKafkaTopic(TOPIC_NAME);
source.setConfig(new Config(configurations));
return source;
}
use of com.hortonworks.streamline.streams.layout.component.TopologyDagVisitor in project streamline by hortonworks.
the class StormTopologyTimeSeriesMetricsImplTest method getProcessorLayoutForTest.
private Component getProcessorLayoutForTest() {
StreamlineProcessor processor = new StreamlineProcessor() {
@Override
public void accept(TopologyDagVisitor visitor) {
}
};
processor.setId("12");
processor.setName("rule");
return processor;
}
use of com.hortonworks.streamline.streams.layout.component.TopologyDagVisitor in project streamline by hortonworks.
the class StormTopologyTimeSeriesMetricsImplTest method getSinkLayoutForTest.
private Component getSinkLayoutForTest() {
StreamlineSink sink = new StreamlineSink() {
@Override
public void accept(TopologyDagVisitor visitor) {
}
};
sink.setId("13");
sink.setName("hdfs");
return sink;
}
Aggregations