bobpaulin commented on code in PR #11872: URL: https://github.com/apache/nifi/pull/11872#discussion_r4606551060
########## nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/components/connector/FlowEvolutionStatus.java: ########## @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.components.connector; + +import java.util.Collection; + +/** + * Reports local progress through the evolve-drain phase of a pending Connector flow evolution. Applying the upgraded flow + * after the evolve-drain phase is tracked through {@link ConnectorState}, as for a configuration update. + */ +public enum FlowEvolutionStatus { + /** + * No evolution is pending, so the node no longer needs the outgoing flow. + */ + INACTIVE, + + /** + * The node still has the outgoing flow and has not finished draining it. + */ + EVOLVE_DRAIN_PENDING, + + /** + * The node has drained the outgoing flow and has not yet applied the upgraded flow. + */ + EVOLVE_DRAIN_COMPLETE, Review Comment: [Claude Opus 5.5] Clarified the class Javadoc. A node reports INACTIVE until an upgrade is pending, then EVOLVE_DRAIN_PENDING, even before the first START. When its local drain finishes it reports EVOLVE_DRAIN_COMPLETE, and keeps reporting it while the upgraded flow is applied. Once the new snapshot is captured it goes back to INACTIVE. There's no separate "complete" value, because INACTIVE already means nothing is pending. FAILED is now documented too: it's reported instead of the drain status until the next START prepares a new attempt. -- 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]
