Search in sources :

Example 1 with TopologyExportVisitor

use of com.hortonworks.streamline.streams.catalog.topology.component.TopologyExportVisitor in project streamline by hortonworks.

the class StreamCatalogService method doExportTopology.

private TopologyData doExportTopology(Topology topology) throws Exception {
    TopologyDag dag = topologyDagBuilder.getDag(topology);
    topology.setTopologyDag(dag);
    TopologyData topologyData = new TopologyData();
    TopologyExportVisitor exportVisitor = new TopologyExportVisitor(topology.getId(), topologyData, this);
    topologyData.setTopologyName(topology.getName());
    topologyData.setConfig(topology.getConfig());
    TopologyDag topologyDag = topology.getTopologyDag();
    if (topologyDag != null) {
        topologyDag.traverse(exportVisitor);
    }
    topologyData.setMetadata(getTopologyEditorMetadata(topology.getId()));
    return topologyData;
}
Also used : TopologyData(com.hortonworks.streamline.streams.catalog.topology.TopologyData) TopologyExportVisitor(com.hortonworks.streamline.streams.catalog.topology.component.TopologyExportVisitor) TopologyDag(com.hortonworks.streamline.streams.layout.component.TopologyDag)

Aggregations

TopologyData (com.hortonworks.streamline.streams.catalog.topology.TopologyData)1 TopologyExportVisitor (com.hortonworks.streamline.streams.catalog.topology.component.TopologyExportVisitor)1 TopologyDag (com.hortonworks.streamline.streams.layout.component.TopologyDag)1