[
https://issues.apache.org/jira/browse/GRIFFIN-191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16615611#comment-16615611
]
Nikolay Sokolov commented on GRIFFIN-191:
-----------------------------------------
Looks like it's thrown as this method returns false:
{code:none}
private boolean isValidBaseLine(List<JobDataSegment> segments) {
assert segments != null;
for (JobDataSegment jds : segments) {
if (jds.isAsTsBaseline()) {
return true;
}
}
LOGGER.warn("Please set segment timestamp baseline " +
"in as.baseline field.");
return false;
}
{code}
Is empty list of segments a valid case, and should it be accepted by API?
> Attempt to create job for 0-day partitioned accuracy measure fails
> ------------------------------------------------------------------
>
> Key: GRIFFIN-191
> URL: https://issues.apache.org/jira/browse/GRIFFIN-191
> Project: Griffin (Incubating)
> Issue Type: Bug
> Reporter: Nikolay Sokolov
> Priority: Trivial
>
> If accuracy measure is created through UI with partition size of 0 days,
> attempt to create job for such measure from UI fails with error "Missing
> 'as.baseline' config in 'data.segments'".
> Request:
> {code:none}
> {"job.name":"my-accuracy-job-0","job.type":"batch","measure.id":404,"cron.expression":"0
> * * * * ?","cron.time.zone":"GMT7:00","data.segments":[]}
> {code}
> Response:
> {code:none}
> {"timestamp":1536989880993,"status":400,"error":"Bad
> Request","code":"40005","message":"Missing 'as.baseline' config in
> 'data.segments'","path":"/api/v1/jobs"}
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)