Skip to content

Failure to create routes in some cases #45

@ennui93

Description

@ennui93

The current routing mechanism fails to create connections between process groups at different points in the hierarchy. Consider a parent process group with two sub-process groups childSource (containing an output port) and childDest (containing an input port). Attempting to route between the two child process groups with the listed connection stanza fails as demonstrated below.

{
      "name": "childRoute",
      "source": "root>parent>childSource",
      "destination": "root>parent>childDest"
}

Instantiating the routeTemplate.xml template and configuring the 'parent' process group with parent.json configuration results in a dangling output port from the childSource process group and the below error:

<-- HTTP/1.1 409 Conflict (33ms)
Date: Tue, 27 Mar 2018 13:52:49 GMT
X-Frame-Options: SAMEORIGIN
Content-Type: text/plain
Transfer-Encoding: chunked
Server: Jetty(9.4.3.v20170317)
OkHttp-Sent-Millis: 1522158770013
OkHttp-Received-Millis: 1522158770045

Cannot add Connection to Process Group because source is an Output Port that does not belong to a child Process Group
<-- END HTTP (117-byte body)
2018-03-27 15:52:50 | ERROR | [main] c.g.h.n.c.Main:154 - Conflict
com.github.hermannpencole.nifi.swagger.ApiException: Conflict
	at com.github.hermannpencole.nifi.swagger.ApiClient.handleResponse(ApiClient.java:1104)
	at com.github.hermannpencole.nifi.swagger.ApiClient.execute(ApiClient.java:1027)
	at com.github.hermannpencole.nifi.swagger.client.ProcessGroupsApi.createConnectionWithHttpInfo(ProcessGroupsApi.java:294)
	at com.github.hermannpencole.nifi.swagger.client.ProcessGroupsApi.createConnection(ProcessGroupsApi.java:279)
	at com.github.hermannpencole.nifi.config.service.CreateRouteService.createConnections(CreateRouteService.java:173)
	at com.github.hermannpencole.nifi.config.service.CreateRouteService.createRoute(CreateRouteService.java:213)
	at com.github.hermannpencole.nifi.config.service.CreateRouteService.createRoutes(CreateRouteService.java:229)
	at com.github.hermannpencole.nifi.config.service.UpdateProcessorService.updateByBranch(UpdateProcessorService.java:91)
	at com.github.hermannpencole.nifi.config.Main.main(Main.java:136)
Exception in thread "main" com.github.hermannpencole.nifi.config.model.ConfigException: Conflict: Cannot add Connection to Process Group because source is an Output Port that does not belong to a child Process Group
	at com.github.hermannpencole.nifi.config.Main.main(Main.java:155)
Caused by: com.github.hermannpencole.nifi.swagger.ApiException: Conflict
	at com.github.hermannpencole.nifi.swagger.ApiClient.handleResponse(ApiClient.java:1104)
	at com.github.hermannpencole.nifi.swagger.ApiClient.execute(ApiClient.java:1027)
	at com.github.hermannpencole.nifi.swagger.client.ProcessGroupsApi.createConnectionWithHttpInfo(ProcessGroupsApi.java:294)
	at com.github.hermannpencole.nifi.swagger.client.ProcessGroupsApi.createConnection(ProcessGroupsApi.java:279)
	at com.github.hermannpencole.nifi.config.service.CreateRouteService.createConnections(CreateRouteService.java:173)
	at com.github.hermannpencole.nifi.config.service.CreateRouteService.createRoute(CreateRouteService.java:213)
	at com.github.hermannpencole.nifi.config.service.CreateRouteService.createRoutes(CreateRouteService.java:229)
	at com.github.hermannpencole.nifi.config.service.UpdateProcessorService.updateByBranch(UpdateProcessorService.java:91)
	at com.github.hermannpencole.nifi.config.Main.main(Main.java:136)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions