Github user JPercivall commented on a diff in the pull request:
https://github.com/apache/nifi-minifi/pull/15#discussion_r60741623
--- Diff:
minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/RunMiNiFi.java
---
@@ -1080,15 +1111,31 @@ public void start() throws IOException,
InterruptedException {
final File reloadFile = getReloadFile(defaultLogger);
if (reloadFile.exists()) {
- defaultLogger.info("Currently reloading
configuration. Will not restart MiNiFi.");
+ defaultLogger.info("Currently reloading
configuration. Will wait to restart MiNiFi.");
Thread.sleep(5000L);
continue;
}
final boolean previouslyStarted = getNifiStarted();
if (!previouslyStarted) {
- defaultLogger.info("MiNiFi never started. Will not
restart MiNiFi");
- return;
+ final File swapConfigFile =
getSwapFile(defaultLogger);
+ if(swapConfigFile.exists()){
+ defaultLogger.info("Swap file exists, MiNiFi
failed trying to change configuration. Reverting to old configuration.");
+
+ final String confDir =
getBootstrapProperties().getProperty(CONF_DIR_KEY);
+ ((MiNiFiConfigurationChangeListener)
changeListener).performTransformation(new FileInputStream(swapConfigFile),
confDir);
--- End diff --
I agree, changing
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---