nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Koji Kawamura <ijokaruma...@gmail.com>
Subject Re: Set priority to files based on date time value stored on attribute
Date Thu, 08 Jun 2017 09:32:58 GMT
Hi Manoj,

I think EnforceOrder would not be useful in your case, as it expects
the order to increases one by one (without skip).
As Pierre suggested, I'd suggest using PriorityAttributePrioritizer.

Thanks,
Koji

On Thu, Jun 8, 2017 at 3:50 PM, Pierre Villard
<pierre.villard.fr@gmail.com> wrote:
> Hi Manoj,
>
> You may want ot have a look at EnforceOrder processor [1] or simply the
> prioritizers [2] of the connections (it depends of how your workflow is
> working). The idea would be to extract the date as an attribute of your flow
> file, convert into an integer (using expression language) and use it to
> ensure order.
>
> [1]
> https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.2.0/org.apache.nifi.processors.standard.EnforceOrder/index.html
> [2]
> https://nifi.apache.org/docs/nifi-docs/html/user-guide.html#prioritization
>
> Hope this helps.
>
>
> 2017-06-08 8:43 GMT+02:00 Manojkumar Ravichandran <sendmailtomj@gmail.com>:
>>
>> Hi All,
>>
>> I need to process the files based on the date time value stored on the
>> attribute
>>
>> For example:
>>
>> If the incoming files contains the following date time attribute values
>>
>> 2017/06/07  16:57:02
>> 2017/06/06  12:49:49
>> 2017/06/06  11:09:28
>> 2017/06/06  06:37:45
>>
>> I need to process the files based on the order of time that is oldest one
>> from the current time
>>
>> First I want to access the file that contains below date time attribute
>> which is the oldest one among them from the current time
>> i.e 2017/06/06  06:37:45
>> and then below one,
>> 2017/06/06  11:09:28
>> and then this
>> 2017/06/06  12:49:49
>> so on ....
>>
>> How can I achieve the above mentioned scenario ?
>>
>> Regards,
>> Manoj kumar R
>
>

Mime
View raw message