[ https://issues.apache.org/jira/browse/NIFI-4003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16033433#comment-16033433 ]
ASF GitHub Bot commented on NIFI-4003: -------------------------------------- Github user bbende commented on the issue: https://github.com/apache/nifi/pull/1879 Reviewing... there are two places in HortonworksSchemaRegistry where client.getSchemaVersionInfo is called without attempting to use the cache stored in the controller service and ends up failing if the schema registry is down, even though the SchemaVersionInfo should be in the local cache: ``` ExecutionException: javax.ws.rs.ProcessingException: java.net.ConnectException: Connection refused java.lang.RuntimeException: com.google.common.util.concurrent.UncheckedExecutionException: javax.ws.rs.ProcessingException: java.net.ConnectException: Connection refused at com.hortonworks.registries.schemaregistry.client.SchemaRegistryClient.getSchemaVersionInfo(SchemaRegistryClient.java:470) at org.apache.nifi.schemaregistry.hortonworks.HortonworksSchemaRegistry.retrieveSchema(HortonworksSchemaRegistry.java:271) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:89) at com.sun.proxy.$Proxy76.retrieveSchema(Unknown Source) at org.apache.nifi.schema.access.HortonworksEncodedSchemaReferenceStrategy.getSchema(HortonworksEncodedSchemaReferenceStrategy.java:69) at org.apache.nifi.serialization.SchemaRegistryService.getSchema(SchemaRegistryService.java:112) ``` > Controller Service for HortonworksSchemaRegistry should expose Cache Duration > as a property > ------------------------------------------------------------------------------------------- > > Key: NIFI-4003 > URL: https://issues.apache.org/jira/browse/NIFI-4003 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions > Reporter: Mark Payne > Assignee: Mark Payne > Fix For: 1.3.0 > > > When we attempt to retrieve the latest schema version information for a > schema with the HortonworksSchemaRegistry controller service, it caches the > information for 1 minute. We should expose that cache duration as a property > so that a tradeoff can be made by the user about how long to go without > retrieving a new value vs. how long to support a local version when unable to > communicate with the remote server. -- This message was sent by Atlassian JIRA (v6.3.15#6346)