Closed bbossola-tesco closed 7 years ago
Yes it's normal, that warns you that a queue is not empty. If you empty queue, you will lose the data. I can add option --force for undeploy to force undeploy and empty queue but it's dangerous.
Okay thanks, I think it's fair. I think then this opens another issue, in the sense, how do I know that a process group has been completely "flushed" and it's ready for redeployment? Ideally an option as "flush+deploy" with a timeout, or something like that.... dunno how that could be structured tough, in terms of "how". I am okay for the deployment task to fail if it takes too much, but it should be in a position to succeed if the conditions are good (i.e. the queues can be emptied timely). I do not want to have a human being to access NiFi. manually shutting down component by component, making sure that the queues are empty, and then click the "deploy" button on the CI.
I can also code properly with TDD, so I could PR to this project but I'd like to have your guidance on the matter.
Hello, The idea is to stop only processors that do not consume queue at first. And after, wait the queues are empty. And only for finish, stop the group processor.
Release 1.1.6 is created and have the correction. If the correction is ok for you, close the issue. If not say what is wrong. thank you for your collaboration
Yup, sounds sensible, everything works. Happy to close the issue (and apologies for the delay but I was on holiday)
If any queue in the processor is not empty at the time of the command then the processor would not be deployed because of a conflict.
Stacktrace from the client:
2017-07-27 11:08:05 | ERROR | [main] c.g.h.n.c.Main:121 - Conflict com.github.hermannpencole.nifi.swagger.ApiException: Conflict at com.github.hermannpencole.nifi.swagger.ApiClient.handleResponse(ApiClient.java:1066) at com.github.hermannpencole.nifi.swagger.ApiClient.execute(ApiClient.java:989) at com.github.hermannpencole.nifi.swagger.client.ProcessGroupsApi.removeProcessGroupWithHttpInfo(ProcessGroupsApi.java:2882) at com.github.hermannpencole.nifi.swagger.client.ProcessGroupsApi.removeProcessGroup(ProcessGroupsApi.java:2866) at com.github.hermannpencole.nifi.config.service.TemplateService.undeploy(TemplateService.java:98) at com.github.hermannpencole.nifi.config.Main.main(Main.java:116) Exception in thread "main" com.github.hermannpencole.nifi.config.model.ConfigException: Conflict: Queue not empty for 3876beb9-2781-4a19-1321-c98080218d05 at com.github.hermannpencole.nifi.config.Main.main(Main.java:122) Caused by: com.github.hermannpencole.nifi.swagger.ApiException: Conflict at com.github.hermannpencole.nifi.swagger.ApiClient.handleResponse(ApiClient.java:1066) at com.github.hermannpencole.nifi.swagger.ApiClient.execute(ApiClient.java:989) at com.github.hermannpencole.nifi.swagger.client.ProcessGroupsApi.removeProcessGroupWithHttpInfo(ProcessGroupsApi.java:2882) at com.github.hermannpencole.nifi.swagger.client.ProcessGroupsApi.removeProcessGroup(ProcessGroupsApi.java:2866) at com.github.hermannpencole.nifi.config.service.TemplateService.undeploy(TemplateService.java:98) at com.github.hermannpencole.nifi.config.Main.main(Main.java:116)