[
https://issues.apache.org/jira/browse/NIFI-4061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16057654#comment-16057654
]
ASF GitHub Bot commented on NIFI-4061:
--------------------------------------
Github user markap14 commented on the issue:
https://github.com/apache/nifi/pull/1918
@bbende thanks! All looks good from a code review perspective. I did some
testing by standing up a docker image of redis. Then I created a 2 node cluster
and added 2 processors: ListFile (File Location = Remote, Primary Node Only) ->
UpdateAttribute. Ran ListFile and saw that state was updated appropriately.
Clicked Clear state. Now, Node 1 was kicked out of my cluster because it failed
to clear state. No indication in the logs, though, as to why it failed. Node 2
had the following stack trace (which is interesting, given that Node 1 was the
one kicked out of the cluster):
{code}
2017-06-21 10:55:33,161 ERROR [StandardProcessScheduler Thread-2]
o.a.n.controller.StandardProcessorNode Failed to invoke @OnScheduled method due
to java.lang.RuntimeException: Failed while executing one of processor's
OnScheduled task.
java.lang.RuntimeException: Failed while executing one of processor's
OnScheduled task.
at
org.apache.nifi.controller.StandardProcessorNode.invokeTaskAsCancelableFuture(StandardProcessorNode.java:1482)
at
org.apache.nifi.controller.StandardProcessorNode.access$000(StandardProcessorNode.java:102)
at
org.apache.nifi.controller.StandardProcessorNode$1.run(StandardProcessorNode.java:1303)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.concurrent.ExecutionException:
java.lang.reflect.InvocationTargetException
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:206)
at
org.apache.nifi.controller.StandardProcessorNode.invokeTaskAsCancelableFuture(StandardProcessorNode.java:1465)
... 9 common frames omitted
Caused by: java.lang.reflect.InvocationTargetException: null
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:497)
at
org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:137)
at
org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:125)
at
org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:70)
at
org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotation(ReflectionUtils.java:47)
at
org.apache.nifi.controller.StandardProcessorNode$1$1.call(StandardProcessorNode.java:1307)
at
org.apache.nifi.controller.StandardProcessorNode$1$1.call(StandardProcessorNode.java:1303)
... 6 common frames omitted
Caused by: java.io.IOException: Unable to update state due to concurrent
modifications
at
org.apache.nifi.redis.state.RedisStateProvider.clear(RedisStateProvider.java:243)
at
org.apache.nifi.controller.state.manager.StandardStateManagerProvider$1.clear(StandardStateManagerProvider.java:292)
at
org.apache.nifi.controller.state.StandardStateManager.clear(StandardStateManager.java:85)
at
org.apache.nifi.processor.util.list.AbstractListProcessor.updateState(AbstractListProcessor.java:217)
... 16 common frames omitted
{code}
> Implement a StateProvider backed by Redis
> -----------------------------------------
>
> Key: NIFI-4061
> URL: https://issues.apache.org/jira/browse/NIFI-4061
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Bryan Bende
> Assignee: Bryan Bende
> Priority: Minor
>
> We currently have only one clustered state provider which is a ZooKeeper
> implementation. Redis would make a good candidate to provide another option.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)