You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/01/30 06:55:00 UTC

[jira] [Commented] (NIFI-4828) MergeContent only processes one bin even if there are multiple ready bins

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

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

GitHub user ijokarumawak opened a pull request:

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

    NIFI-4828: Fix MergeContent to process all ready bins

    ## NOTE to reviewers
    
    This pull request has 3 commits intentionally. The first one is sufficient to address NIFI-4828. The other two commits are further refactoring those are not required, but should be incorporated, too. I didn't create dedicated JIRAs for those since they're too trivial.
    
    Please squash commits and merge if all of those look fine. Or remove the 2nd or 3rd commit if it looks over engineered. Thank you!
    
    ---
    
    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)?
    
    - [ ] 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?
    - [ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?
    
    ### For documentation related changes:
    - [ ] 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-4828

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

    https://github.com/apache/nifi/pull/2444.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 #2444
    
----

----


> MergeContent only processes one bin even if there are multiple ready bins
> -------------------------------------------------------------------------
>
>                 Key: NIFI-4828
>                 URL: https://issues.apache.org/jira/browse/NIFI-4828
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.0.0
>            Reporter: Koji Kawamura
>            Assignee: Koji Kawamura
>            Priority: Major
>         Attachments: mergecontent-multi-bins.xml
>
>
> [BinFiles.processBins|https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-extension-utils/nifi-processor-utils/src/main/java/org/apache/nifi/processor/util/bin/BinFiles.java#L219] is expected to loop through all ready bins, but it only process the first bin. This incurs larger latency for FlowFiles to be merged.
> For example, if there are two FlowFiles FF1 and FF2 queued for a MergeContent processor, each has an attribute named 'group'. FF1.group = 'a', and FF2.group = 'b'. MergeContent is configured to use 'Correlation Attribute Name' as 'group'.
> MergeContent takes FF1 and FF2 from its input queue, then correctly creates two bins for group a and b, each having FF1 and FF2 respectively.
> Bug BinFiles.processBins only processes the first bin, which can be either the bin for group a or b. The other bin is left unprocessed.
> The attached flow template has a flow to reproduce this.
> Expected behavior is MergeContent to process all queued FlowFiles at a single onTrigger run.



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