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

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

Github user ckmcd commented on the pull request:

    https://github.com/apache/nifi/pull/322#issuecomment-211429563
  
    I've update the PR to address the issues (1 & 2) from above.  
    
    1. Updated the EL Guide to use plus() instead of add()
    2. Use Math.abs() so as only to generate non-negative numbers.  Updated EL 
guide to reflect this change.


> Expression language should support a random function
> ----------------------------------------------------
>
>                 Key: NIFI-1661
>                 URL: https://issues.apache.org/jira/browse/NIFI-1661
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Christopher McDermott
>            Assignee: Joe Skora
>            Priority: Minor
>             Fix For: 0.7.0
>
>
> Random would be a subjectless function that generates a 32? bit random 
> number.  The random number generator need not be cryptographically secure. 
> A use case would be for random be to generate a random pattern across some 
> number of file paths to be used with putFile.
> Example - puts files randomly to /my-dirs/dir-1, /my-dirs/dir-2, 
> /my-dirs/dir-3
> /my-dirs/dir-${random():mod(3):plus(1)}/



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

Reply via email to