use of org.apache.kafka.streams.TopologyDescription in project ksql by confluentinc.
the class AggregateNodeTest method shouldHaveTwoSubTopologies.
@Test
public void shouldHaveTwoSubTopologies() {
buildRequireRekey();
final TopologyDescription description = builder.build().describe();
assertThat(description.subtopologies().size(), equalTo(2));
}
use of org.apache.kafka.streams.TopologyDescription in project ksql by confluentinc.
the class PlanTestUtil method getNodeByName.
static TopologyDescription.Node getNodeByName(final Topology topology, final String nodeName) {
final TopologyDescription description = topology.describe();
final Set<TopologyDescription.Subtopology> subtopologies = description.subtopologies();
List<TopologyDescription.Node> nodes = subtopologies.stream().flatMap(subtopology -> subtopology.nodes().stream()).collect(Collectors.toList());
final Map<String, List<TopologyDescription.Node>> nodesByName = nodes.stream().collect(Collectors.groupingBy(TopologyDescription.Node::name));
return nodesByName.get(nodeName).get(0);
}
use of org.apache.kafka.streams.TopologyDescription in project ksql by confluentinc.
the class AggregateNodeTest method shouldHaveOneSubTopologyIfGroupByKey.
@Test
public void shouldHaveOneSubTopologyIfGroupByKey() {
build();
final TopologyDescription description = builder.build().describe();
assertThat(description.subtopologies().size(), equalTo(1));
}
Aggregations