exceptionfactory commented on PR #9617: URL: https://github.com/apache/nifi/pull/9617#issuecomment-2581174769
> Ok, I have made the changes and it seems to be working. I just want to add a more specific validator. I used the standard NON_EMPTY_VALIDATOR just to see if the EL would work. I'll have to add some custom logic to be sure the value properly evaluates to a for data size. Actually, the `DATA_SIZE_VALIDATOR` in `StandardValidators` supports EL if enabled, so it seems like that should work without requiring custom validation. > > Having said that, while this EL approach can be made to work, I find it far more obscure than the provided implementation. From a user-friendly perspective, constructing the proper EL is more complex. I rarely agree with changing code just because a user wasn't aware of a feature or capability. In this case though, I find it much easier to understand. > > I would like the submitted implementation to be considered over EL unless there is a strong argument against it. Why do you prefer EL? I agree EL adds some complexity, and we should be careful about introducing too much complexity from an end-user perspective. That being said, introducing three new properties to support non-deterministic random file sizes adds complexity in a different direction. I would not expect this feature to be commonly used, so that's the primary reason why it seems better to introduce EL support as a way to provide more flexibility. EL supports the test use case described, and supports deterministic sizes based in a way that isn't as easily achieved without more properties. Theoretically, the explicit property approach could still be considered down the road, but given the use case, it seems better to introduce EL as the current way forward. -- 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]
