[ 
https://issues.apache.org/jira/browse/NIFI-5273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16503543#comment-16503543
 ] 

Pierre Villard commented on NIFI-5273:
--------------------------------------

I think the issue here is not a yield problem. Looking at the code, if there is 
an exception raised during the flow file processing, the flow file will be 
routed to failure. If you are re-routing the failure relationship back to the 
processor, the flow file will be processed again and again and generate the 
same failure. An option would be to penalize the flow file but I don't see what 
use case could justify to have the failure relationship back on the processor. 
I think it's more a workflow design issue.

[~ncerutti] - can you confirm it looks like what you're facing?

> UpdateRecord does not yield as expected
> ---------------------------------------
>
>                 Key: NIFI-5273
>                 URL: https://issues.apache.org/jira/browse/NIFI-5273
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.6.0
>            Reporter: nicolas cerutti
>            Priority: Major
>
> Hello,
> I have an UpdateRecord with the configuration defined
> _Record Reader -> Controller Service "Json TreeReader"_
> _Record Writer -> Controller Service "CSVRecordSetWriter"_
> _Replacement Value Strategy ->_ 
> _/stack_na (new property) -> 
> ${field.value:replaceAll('<\d*>[A-Z]\{1}[a-z]\{2} \d\{2} 
> \d\{2}:\d\{2}:\d\{2}.[^:]*:', '')}_
> _/timestamp (new property) -> 
> ${field.value:toDate("yyyy-MM-dd'T'HH:mm:ss"):format("yyyy-MM-dd HH:mm:ss")}_
> A syntax error was set and we have the following error :
> *Stack Trace :* 
> 2018-06-06 15:15:22,124 ERROR [Timer-Driven Process Thread-3] 
> o.a.n.processors.standard.UpdateRecord 
> UpdateRecord[id=5df23125-c500-1508-bec2-062b7c4864c6] Failed to process 
> StandardFlowFileRecord[uuid=fd24efd9-be57-4449-a700-774e93f8ea5e,claim=StandardContentClaim
>  [resourceClaim=StandardResourceClaim[id=1528211253276-28, container=default, 
> section=28], offset=259115, 
> length=2824064],offset=0,name=metrics_20180605172848_132.haas.socgen.log,size=2824064]:
>  
> org.apache.nifi.attribute.expression.language.exception.IllegalAttributeException:
>  Cannot parse attribute value as a date; date format: MMM dd HH:mm:ss; 
> attribute value: 2018-06-01T00:21:01
> org.apache.nifi.attribute.expression.language.exception.IllegalAttributeException:
>  Cannot parse attribute value as a date; date format: MMM dd HH:mm:ss; 
> attribute value: 2018-06-01T00:21:01
>         at 
> org.apache.nifi.attribute.expression.language.evaluation.functions.StringToDateEvaluator.evaluate(StringToDateEvaluator.java:65)
>         at 
> org.apache.nifi.attribute.expression.language.evaluation.functions.FormatEvaluator.evaluate(FormatEvaluator.java:45)
>         at 
> org.apache.nifi.attribute.expression.language.Query.evaluate(Query.java:587)
>         at 
> org.apache.nifi.attribute.expression.language.Query.evaluateExpression(Query.java:393)
>         at 
> org.apache.nifi.attribute.expression.language.StandardPreparedQuery.evaluateExpressions(StandardPreparedQuery.java:48)
>         at 
> org.apache.nifi.attribute.expression.language.StandardPropertyValue.evaluateAttributeExpressions(StandardPropertyValue.java:160)
>         at 
> org.apache.nifi.attribute.expression.language.StandardPropertyValue.evaluateAttributeExpressions(StandardPropertyValue.java:148)
>         at 
> org.apache.nifi.attribute.expression.language.StandardPropertyValue.evaluateAttributeExpressions(StandardPropertyValue.java:138)
>         at 
> org.apache.nifi.processors.standard.UpdateRecord.lambda$process$1(UpdateRecord.java:174)
>         at 
> java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
>         at 
> java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
>         at 
> java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:419)
>         at 
> java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
>         at 
> java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
>         at 
> java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
>         at 
> java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
>         at 
> java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
>         at 
> java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
>         at 
> org.apache.nifi.processors.standard.UpdateRecord.process(UpdateRecord.java:168)
>         at 
> org.apache.nifi.processors.standard.AbstractRecordProcessor$1.process(AbstractRecordProcessor.java:129)
>         at 
> org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2785)
>         at 
> org.apache.nifi.processors.standard.AbstractRecordProcessor.onTrigger(AbstractRecordProcessor.java:118)
>         at 
> org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
>         at 
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1118)
>         at 
> org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147)
>         at 
> org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47)
>         at 
> org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132)
>         at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>         at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>         at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>         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:748)
>  
>  
> Thanks for your help on this bug
>  
> Nicolas C.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to