[
https://issues.apache.org/jira/browse/APEXCORE-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15170701#comment-15170701
]
Munagala V. Ramanath commented on APEXCORE-361:
-----------------------------------------------
Another data point:
I tried this with the default project generated by the maven archetype and it
worked. I added this property in RandomNumberGenerator:
{code}
@Size(min = 3)
Set<String> set = new HashSet<>();
{code}
When launching I got the expected error:
{quote}
An error occurred trying to launch the application. Server message:
javax.validation.ConstraintViolationException: Operator randomGenerator
violates constraints
[ConstraintViolationImpl{rootBean=RandomNumberGenerator{name=null},
propertyPath='set', message='size must be between 3 and 2147483647',
leafBean=RandomNumberGenerator{name=null}, value=[]}] at
com.datatorrent.stram.plan.logical.LogicalPlan.validate(LogicalPlan.java:1337)
at com.datatorrent.stram.StramClient.<init>(StramClient.java:141) at
com.datatorrent.stram.client.StramAppLauncher.launchApp(StramAppLauncher.java:508)
at com.datatorrent.stram.cli.DTCli$LaunchCommand.execute(DTCli.java:2047) at
com.datatorrent.stram.cli.DTCli.launchAppPackage(DTCli.java:3450) at
com.datatorrent.stram.cli.DTCli.access$7000(DTCli.java:106) at
com.datatorrent.stram.cli.DTCli$LaunchCommand.execute(DTCli.java:1892) at
com.datatorrent.stram.cli.DTCli$3.run(DTCli.java:1449)
{quote}
So maybe the fact that it is a nested property is the issue ?
> Validation constraint @Size is not honored by the platform during dag
> validation
> ---------------------------------------------------------------------------------
>
> Key: APEXCORE-361
> URL: https://issues.apache.org/jira/browse/APEXCORE-361
> Project: Apache Apex Core
> Issue Type: Bug
> Reporter: Chandni Singh
> Assignee: Chandni Singh
>
> I created a DAG :
> FileSplitterInput -> BlockReader -> Devnull
> Splitter has a property TimeBasedDirectoryScanner which has a property
> `files` that is a Set of Strings.
> I have marked that property with {code} @Size(min = 1) {code}. However even
> when the set is empty, dag validation passes.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)