NIFI-13706 Handled Exceptions Fetching Parameters on Startup (#9227)

This commit is contained in:
David Handermann 2024-09-03 16:29:32 -05:00 committed by GitHub
parent 5c3e22aa44
commit 0510e716b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 3 deletions

View File

@ -1067,8 +1067,14 @@ public class VersionedFlowSynchronizer implements FlowSynchronizer {
}
private Map<String, Parameter> getProvidedParameters(final ParameterProviderNode parameterProviderNode, final String parameterGroupName) {
logger.debug("Fetching Parameters for Group [{}] from Provider [{}]", parameterGroupName, parameterProviderNode.getIdentifier());
parameterProviderNode.fetchParameters();
final String providerId = parameterProviderNode.getIdentifier();
logger.debug("Fetching Parameters for Group [{}] from Provider [{}]", parameterGroupName, providerId);
try {
parameterProviderNode.fetchParameters();
} catch (final Exception e) {
logger.warn("Fetching Parameters for Group [{}] from Provider [{}] failed", parameterGroupName, providerId, e);
}
final Map<String, Parameter> parameters;
final Optional<ParameterGroup> foundParameterGroup = parameterProviderNode.findFetchedParameterGroup(parameterGroupName);
@ -1082,7 +1088,7 @@ public class VersionedFlowSynchronizer implements FlowSynchronizer {
parameters = Collections.emptyMap();
}
logger.info("Fetched Parameters [{}] for Group [{}] from Provider [{}]", parameters.size(), parameterGroupName, parameterProviderNode.getIdentifier());
logger.info("Fetched Parameters [{}] for Group [{}] from Provider [{}]", parameters.size(), parameterGroupName, providerId);
return parameters;
}