bbende commented on a change in pull request #3677: NIFI-6598 Storing peers into managed-state URL: https://github.com/apache/nifi/pull/3677#discussion_r327189220
########## File path: nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/SiteToSiteClient.java ########## @@ -921,6 +931,23 @@ public File getPeerPersistenceFile() { return peerPersistenceFile; } + @Override + public StateManager getStateManager() { + return stateManager; + } + + @Override + public PeerPersistence getPeerPersistence() { + if (stateManager != null) { + return new StatePeerPersistence(stateManager); + + } else if (peerPersistenceFile != null) { + return new FilePeerPersistence(peerPersistenceFile); + } + + return null; + } + Review comment: Anything that is part of the SiteToSiteClientConfig needs to also implement Serializable because when the SiteToSite client is used in the streaming integrations like SparkReceiver or Strom, it will serialize the config. I think this means we need to make StateManager, and any of it's member classes, implement Serializable, and also the new PeerPersistence implementations. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services