thenatog commented on a change in pull request #4613:
URL: https://github.com/apache/nifi/pull/4613#discussion_r520912917



##########
File path: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/state/providers/zookeeper/ZooKeeperStateProvider.java
##########
@@ -133,20 +147,52 @@ public ZooKeeperStateProvider() {
         return properties;
     }
 
-
     @Override
     public synchronized void init(final StateProviderInitializationContext 
context) {
         connectionString = context.getProperty(CONNECTION_STRING).getValue();
         rootNode = context.getProperty(ROOT_NODE).getValue();
         timeoutMillis = 
context.getProperty(SESSION_TIMEOUT).asTimePeriod(TimeUnit.MILLISECONDS).intValue();
 
+        final Properties stateProviderProperties = new Properties();
+        
stateProviderProperties.setProperty(NiFiProperties.ZOOKEEPER_SESSION_TIMEOUT, 
String.valueOf(timeoutMillis));
+        
stateProviderProperties.setProperty(NiFiProperties.ZOOKEEPER_CONNECT_TIMEOUT, 
String.valueOf(timeoutMillis));
+        
stateProviderProperties.setProperty(NiFiProperties.ZOOKEEPER_ROOT_NODE, 
rootNode);
+        
stateProviderProperties.setProperty(NiFiProperties.ZOOKEEPER_CONNECT_STRING, 
connectionString);
+
+        zooKeeperClientConfig = 
ZooKeeperClientConfig.createConfig(combineProperties(nifiProperties, 
stateProviderProperties));

Review comment:
       Apparently the order of the initialization -> validator was correct so I 
reverted that back and stopped the properties from being used in initialization 
of the ZooKeeperStateProvider to fix the issue of the validator not catching 
empty/missing properties.




----------------------------------------------------------------
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:
[email protected]


Reply via email to