exceptionfactory commented on PR #9617:
URL: https://github.com/apache/nifi/pull/9617#issuecomment-2581079938

   > > Thanks for proposing this change @markobean.
   > > As the Jira issue does not provide much background, can you describe the 
general use case in mind for randomized FlowFile sizes?
   > > From an implementation perspective, it seems like it would be simpler to 
support using Expression Language in the existing `File Size` property. That 
would allow for some amount of random size generation if desired, without 
introducing additional configuration properties.
   > 
   > Expression Language will not work in this case as GenerateFlowFile does 
not accept an incoming connection. At best, an environment variable could be 
referenced, but again, this would be a fixed value.
   > 
   > This use case is to have FlowFiles of various sizes injected into a flow 
for further testing. Some flows are specifically designed to handle FlowFiles 
of certain sizes differently. For example, if files are "large", perhaps they 
are compressed. This is a trivial example, but the point is this feature 
supports a greater degree of flexibility of data while testing a flow.
   
   Expression Language can be used in absence of an input FlowFile, it would be 
evaluated as a self-contained expression. EL has a `random()` function that 
would support this kind of use case.
   
   Thanks for the additional background on potential test scenarios. I can 
appreciate testing files of different sizes. However, if that is the case, it 
seems like it would be important to have deterministic inputs, versus random 
inputs. Either way, EL with some logic would actually provide more flexibility 
for some sort of pseudo-random size-based output files.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to