exceptionfactory commented on a change in pull request #5787:
URL: https://github.com/apache/nifi/pull/5787#discussion_r817698859
##########
File path:
nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/ShutdownHook.java
##########
@@ -51,7 +53,7 @@ public void run() {
runner.setAutoRestartNiFi(false);
final int ccPort = runner.getNiFiCommandControlPort();
if (ccPort > 0) {
- System.out.println("Initiating Shutdown of NiFi...");
+ System.out.println("Initiating Shutdown of NiFi... pid=" + pid);
Review comment:
Recommend the following in relationship to the comment on `RunNiFi`, as
well as adjusting the method call to use `printf()` for formatting:
```suggestion
System.out.printf("NiFi process [%s] shutdown started%n", pid);
```
##########
File path: nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java
##########
@@ -116,7 +116,7 @@
public static final String PID_KEY = "pid";
public static final int STARTUP_WAIT_SECONDS = 60;
- public static final long GRACEFUL_SHUTDOWN_RETRY_MILLIS = 2000L;
+ public static final long GRACEFUL_SHUTDOWN_RETRY_MILLIS = 1000L;
Review comment:
Is there a particular reason for reducing retry interval?
##########
File path: nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java
##########
@@ -1056,7 +1056,7 @@ private void waitForShutdown(final String pid, final
Logger logger, final File s
logger.error("Failed to delete pid file {}; this file should be
cleaned up manually", pidFile);
}
- logger.info("NiFi has finished shutting down.");
+ logger.info("NiFi has finished shutting down. (PID={})", pid);
Review comment:
References to the Process ID appear differently in this class versus
`ShutdownHook`. Recommend keeping `PID` capitalized and adjusting the log as
follows:
```suggestion
logger.info("NiFi process [{}] shutdown completed", pid);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]