use of com.hortonworks.streamline.streams.layout.component.StreamGrouping in project streamline by hortonworks.
the class TopologyComponentFactory method getStreamlineEdge.
public Edge getStreamlineEdge(TopologyEdge topologyEdge) {
Edge edge = new Edge();
edge.setId(topologyEdge.getId().toString());
edge.setFrom(getOutputComponent(topologyEdge));
edge.setTo(getInputComponent(topologyEdge));
Set<StreamGrouping> streamGroupings = new HashSet<>();
for (TopologyEdge.StreamGrouping streamGrouping : topologyEdge.getStreamGroupings()) {
Stream stream = getStream(catalogService.getStreamInfo(topologyEdge.getTopologyId(), streamGrouping.getStreamId(), topologyEdge.getVersionId()));
Stream.Grouping grouping = Stream.Grouping.valueOf(streamGrouping.getGrouping().name());
streamGroupings.add(new StreamGrouping(stream, grouping, streamGrouping.getFields()));
}
edge.addStreamGroupings(streamGroupings);
return edge;
}
Aggregations