Github user jtstorck commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/3010#discussion_r220000525
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowService.java
 ---
    @@ -662,6 +682,39 @@ private void handleReconnectionRequest(final 
ReconnectionRequestMessage request)
             }
         }
     
    +    private void handleDecommissionRequest(final DecommissionMessage 
request) throws InterruptedException {
    +        logger.info("Received decommission request message from manager 
with explanation: " + request.getExplanation());
    +        decommission(request.getExplanation());
    +    }
    +
    +    private void decommission(final String explanation) throws 
InterruptedException {
    +        writeLock.lock();
    +        try {
    +
    +            logger.info("Decommissioning node due to " + explanation);
    +
    +            // mark node as decommissioning
    +            controller.setConnectionStatus(new 
NodeConnectionStatus(nodeId, NodeConnectionState.DECOMMISSIONING, 
DecommissionCode.DECOMMISSIONED, explanation));
    +            // request to stop all processors on node
    +            controller.stopAllProcessors();
    --- End diff --
    
    Done.  Also, all RPGs will have stopTransmitting() called on them.


---

Reply via email to