[jira] [Commented] (NIFI-4170) PutWebSocket processor does not support 'Penalty duration' and 'Yield duration' settings
[ https://issues.apache.org/jira/browse/NIFI-4170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16083420#comment-16083420 ] Y Wikander commented on NIFI-4170: -- I'll pursue your line of thinking. The discussion turning to processor level misconfiguration makes me ponder the Validators. Not that I really wanted to go deep into the weeds; but would Validators be the "correct" way? Such that the processor would be stopped and the yellow warning symbol would show up in the GUI. This is presuming that Users would be more interested in pursuing those (warning) messages vs. assumed transitory error messages that will probably go away on their own (if you wait long enough). To that end, can Validators be triggered _while_ a processor is running? And, does a processor stop itself as part this action? > PutWebSocket processor does not support 'Penalty duration' and 'Yield > duration' settings > > > Key: NIFI-4170 > URL: https://issues.apache.org/jira/browse/NIFI-4170 > Project: Apache NiFi > Issue Type: Improvement > Components: Extensions >Affects Versions: 1.3.0 >Reporter: Y Wikander >Priority: Minor > Labels: patch > Attachments: > 0002-websocket-PutWebSocket-processor-support-Penalty-dur.patch > > > PutWebSocket processor does not support 'Penalty duration' and 'Yield > duration' settings. > I'm assuming that calling content.yield() will also cover 'Penalty duration'. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (NIFI-4170) PutWebSocket processor does not support 'Penalty duration' and 'Yield duration' settings
[ https://issues.apache.org/jira/browse/NIFI-4170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16083337#comment-16083337 ] Koji Kawamura commented on NIFI-4170: - That's a good point. I agree with that. I think following rule would be the best: - If the issue is likely caused by incoming FlowFile, the FlowFile should be penalized. No need to yield the processor because other FlowFile might have correct attributes and just works. -- When processor didn't find a CS, [here|https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-processors/src/main/java/org/apache/nifi/processors/websocket/PutWebSocket.java#L183] and [here|https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-processors/src/main/java/org/apache/nifi/processors/websocket/PutWebSocket.java#L186] - If the issue is likely caused by processor level miss configuration or target server (WebSocket client or server), then we yield the processor. Optionally we can penalize the FlowFile, too (just for the use-case where 'failure' is connected back to itself). -- When processor catches Exception, [here|https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-processors/src/main/java/org/apache/nifi/processors/websocket/PutWebSocket.java#L238] So, adding penalize at transferToFailure(), and adding context.yield() when processor catches Exception would do above. How do you think? > PutWebSocket processor does not support 'Penalty duration' and 'Yield > duration' settings > > > Key: NIFI-4170 > URL: https://issues.apache.org/jira/browse/NIFI-4170 > Project: Apache NiFi > Issue Type: Improvement > Components: Extensions >Affects Versions: 1.3.0, 1.4.0 >Reporter: Y Wikander >Priority: Minor > Labels: patch > Fix For: 1.3.0, 1.4.0 > > Attachments: > 0002-websocket-PutWebSocket-processor-support-Penalty-dur.patch > > > PutWebSocket processor does not support 'Penalty duration' and 'Yield > duration' settings. > I'm assuming that calling content.yield() will also cover 'Penalty duration'. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (NIFI-4170) PutWebSocket processor does not support 'Penalty duration' and 'Yield duration' settings
[ https://issues.apache.org/jira/browse/NIFI-4170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16081601#comment-16081601 ] Y Wikander commented on NIFI-4170: -- I'm challenged to agree to just 'yield' under the single condition set you requested. >From what I can tell, the other reasons for failure are related to bad >configuration of the PutWebSocket processor; related to Broadcast support. And >that they won't go away until a human fixes it. > PutWebSocket processor does not support 'Penalty duration' and 'Yield > duration' settings > > > Key: NIFI-4170 > URL: https://issues.apache.org/jira/browse/NIFI-4170 > Project: Apache NiFi > Issue Type: Improvement > Components: Extensions >Affects Versions: 1.3.0, 1.4.0 >Reporter: Y Wikander >Priority: Minor > Labels: patch > Fix For: 1.3.0, 1.4.0 > > Attachments: > 0002-websocket-PutWebSocket-processor-support-Penalty-dur.patch > > > PutWebSocket processor does not support 'Penalty duration' and 'Yield > duration' settings. > I'm assuming that calling content.yield() will also cover 'Penalty duration'. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (NIFI-4170) PutWebSocket processor does not support 'Penalty duration' and 'Yield duration' settings
[ https://issues.apache.org/jira/browse/NIFI-4170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16079870#comment-16079870 ] Koji Kawamura commented on NIFI-4170: - Thanks for sharing a patch [~ywik] While there are few situations that PutWebSocket executes 'transferToFailure', I think here is the only place we need to yield the processor. https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-processors/src/main/java/org/apache/nifi/processors/websocket/PutWebSocket.java#L238 Because yielding a processor is good for a situation that, it's most likely that the processor will produce the same error if it's executed again, regardless what input FlowFile comes, and we want to avoid doing that too often. Other places that calls transferToFailure would be caused by an input FlowFile, so I don't think we need to yield processor. FYI, 'Penalty duration' is for delaying a FlowFile to be picked from a queue (because it caused some issue and can cause it again), so that other FlowFiles can be processed while it's penalized. How do you think? If you agree, would you update the patch to only 'yield' when it catches WebSocketConfigurationException, IllegalStateException or IOException? > PutWebSocket processor does not support 'Penalty duration' and 'Yield > duration' settings > > > Key: NIFI-4170 > URL: https://issues.apache.org/jira/browse/NIFI-4170 > Project: Apache NiFi > Issue Type: Improvement > Components: Extensions >Affects Versions: 1.3.0, 1.4.0 >Reporter: Y Wikander >Priority: Minor > Labels: patch > Fix For: 1.3.0, 1.4.0 > > Attachments: > 0002-websocket-PutWebSocket-processor-support-Penalty-dur.patch > > > PutWebSocket processor does not support 'Penalty duration' and 'Yield > duration' settings. > I'm assuming that calling content.yield() will also cover 'Penalty duration'. -- This message was sent by Atlassian JIRA (v6.4.14#64029)