You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by "Mark Payne (JIRA)" <ji...@apache.org> on 2015/02/02 19:58:34 UTC

[jira] [Updated] (NIFI-305) Refactor base class from MergeContent

     [ https://issues.apache.org/jira/browse/NIFI-305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Payne updated NIFI-305:
----------------------------
    Attachment: 0001-NIFI-305-Slight-refactorings-to-provide-more-flexibi.patch

Joe G:

Added some minor refactorings:

do not pass logger to processBin: already accessible via getLogger()

throw ProcessException instead of Exception from processBin: throwing the general Exception is considered a bad practice
catch ProcessException when calling processBin: any other exception is considered a bug and should be handled by the framework.

relationships and property descriptors
-> instead of 'defineAdditional...', just allow the processor to override the getPropertyDescriptors, getRelationships.
	- The current implementation limits flexibility by forcing the Processor to know these ahead of time in the 'init' method. Processor should be free
	  to generate the List whenever the getter methods are called. Also limits ability of concrete implementation to control ordering of properties.


Please take a look at the supplied patch and verify that you're happy with it, and let me know one if there's anything there that you don't like.

Thanks
-Mark

> Refactor base class from MergeContent
> -------------------------------------
>
>                 Key: NIFI-305
>                 URL: https://issues.apache.org/jira/browse/NIFI-305
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>    Affects Versions: 0.0.1
>            Reporter: Joseph Gresock
>            Priority: Minor
>         Attachments: 0001-NIFI-305-Slight-refactorings-to-provide-more-flexibi.patch
>
>
> The binning logic in MergeContent is extremely useful, and could be pulled out into an abstract superclass.  This would allow other processors to perform binning logic without being tied to a merged flow file.  For example, a processor may want to submit a batch request to a database like Solr, or to a REST endpoint.  
> The vast majority of the code in MergeContent would remain in the concrete class, but there are several points, such as the BinManager usage, that could be abstracted for easy extensibility.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)