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

ASF GitHub Bot commented on NIFI-3415:
--------------------------------------

GitHub user ijokarumawak opened a pull request:

    https://github.com/apache/nifi/pull/1658

    NIFI-3415: Add Rollback on Failure.

    - Added org.apache.nifi.processor.util.pattern package in 
nifi-processor-utils containing reusable functions to mix-in 'Rollback on 
Failure' capability.                                                    - 
Created a process pattern classes, Put and PutGroup. It will be helpful to 
standardize Processor implementations.
    - Applied Rollback on Failure to PutSQL, PutHiveQL and PutHiveStreaming.
    - Fixed existing issues on PutHiveStreaming:
      - Output FlowFile Avro format was corrupted by concatenating multiple 
Avro files.
      - Output FlowFile records had incorrect values because of reusing 
GenericRecord instance.
    
    Thank you for submitting a contribution to Apache NiFi.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [x] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [x] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number 
you are trying to resolve? Pay particular attention to the hyphen "-" character.
    
    - [x] Has your PR been rebased against the latest commit within the target 
branch (typically master)?
    
    - [x] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [x] Have you ensured that the full suite of tests is executed via mvn 
-Pcontrib-check clean install at the root nifi folder?
    - [x] Have you written or updated unit tests to verify your changes?
    - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)? 
    - [ ] If applicable, have you updated the LICENSE file, including the main 
LICENSE file under nifi-assembly?
    - [ ] If applicable, have you updated the NOTICE file, including the main 
NOTICE file found under nifi-assembly?
    - [x] If adding new Properties, have you added .displayName in addition to 
.name (programmatic access) for each of the new properties?
    
    ### For documentation related changes:
    - [x] Have you ensured that format looks appropriate for the output in 
which it is rendered?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ijokarumawak/nifi nifi-3415

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/1658.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1658
    
----
commit e5c235be647957d8804a3bca004f97b4269cc170
Author: Koji Kawamura <ijokaruma...@apache.org>
Date:   2017-03-02T00:51:12Z

    NIFI-3415: Add Rollback on Failure.
    
    - Added org.apache.nifi.processor.util.pattern package in 
nifi-processor-utils containing reusable functions to mix-in 'Rollback on 
Failure' capability.                                                    - 
Created a process pattern classes, Put and PutGroup. It will be helpful to 
standardize Processor implementations.
    - Applied Rollback on Failure to PutSQL, PutHiveQL and PutHiveStreaming.
    - Fixed existing issues on PutHiveStreaming:
      - Output FlowFile Avro format was corrupted by concatenating multiple 
Avro files.
      - Output FlowFile records had incorrect values because of reusing 
GenericRecord instance.

----


> Add "Rollback on Failure" property to PutHiveStreaming, PutHiveQL, and PutSQL
> -----------------------------------------------------------------------------
>
>                 Key: NIFI-3415
>                 URL: https://issues.apache.org/jira/browse/NIFI-3415
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Matt Burgess
>            Assignee: Koji Kawamura
>
> Many Put processors (such as PutHiveStreaming, PutHiveQL, and PutSQL) offer 
> "failure" and "retry" relationships for flow files that cannot be processed, 
> perhaps due to issues with the external system or other errors.
> However there are use cases where if a Put fails, then no other flow files 
> should be processed until the issue(s) have been resolved.  This should be 
> configurable for said processors, to enable both the current behavior and a 
> "stop on failure" type of behavior.
> I propose a property be added to the Put processors (at a minimum the 
> PutHiveStreaming, PutHiveQL, and PutSQL processors) called "Rollback on 
> Failure", which offers true or false values.  If set to true, then the 
> "failure" and "retry" relationships should be removed from the processor 
> instance, and if set to false, those relationships should be offered.
> If Rollback on Failure is false, then the processor should continue to behave 
> as it has. If set to true, then if any error occurs while processing a flow 
> file, the session should be rolled back rather than transferring the flow 
> file to some error-handling relationship.
> It may also be the case that if Rollback on Failure is true, then the 
> incoming connection must use a FIFO Prioritizer, but I'm not positive. The 
> documentation should be updated to include any such requirements.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to