mirror of https://github.com/apache/nifi.git
NIFI-884 Moving deletion of pid file from beginning of stop() to after a successful stop
This commit is contained in:
parent
1f6805f06d
commit
0931c6b0d6
|
@ -499,11 +499,6 @@ public class RunNiFi {
|
||||||
final Properties nifiProps = loadProperties(logger);
|
final Properties nifiProps = loadProperties(logger);
|
||||||
final String secretKey = nifiProps.getProperty("secret.key");
|
final String secretKey = nifiProps.getProperty("secret.key");
|
||||||
|
|
||||||
final File statusFile = getStatusFile(logger);
|
|
||||||
if (statusFile.exists() && !statusFile.delete()) {
|
|
||||||
logger.error("Failed to delete status file {}; this file should be cleaned up manually", statusFile);
|
|
||||||
}
|
|
||||||
|
|
||||||
try (final Socket socket = new Socket()) {
|
try (final Socket socket = new Socket()) {
|
||||||
logger.debug("Connecting to NiFi instance");
|
logger.debug("Connecting to NiFi instance");
|
||||||
socket.setSoTimeout(60000);
|
socket.setSoTimeout(60000);
|
||||||
|
@ -568,6 +563,10 @@ public class RunNiFi {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final File statusFile = getStatusFile(logger);
|
||||||
|
if (statusFile.exists() && !statusFile.delete()) {
|
||||||
|
logger.error("Failed to delete status file {}; this file should be cleaned up manually", statusFile);
|
||||||
|
}
|
||||||
logger.info("NiFi has finished shutting down.");
|
logger.info("NiFi has finished shutting down.");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue