use of com.thinkbiganalytics.metadata.rest.model.feed.FeedPrecondition in project kylo by Teradata.
the class FeedsController method ensurePrecondition.
private void ensurePrecondition(Feed feed, com.thinkbiganalytics.metadata.api.feed.Feed domainFeed) {
FeedPrecondition precond = feed.getPrecondition();
if (precond != null) {
List<com.thinkbiganalytics.metadata.sla.api.Metric> domainMetrics = precond.getSla().getObligations().stream().flatMap((grp) -> grp.getMetrics().stream()).map((metric) -> metric).collect(Collectors.toList());
feedProvider.createPrecondition(domainFeed.getId(), "", domainMetrics);
}
}
use of com.thinkbiganalytics.metadata.rest.model.feed.FeedPrecondition in project kylo by Teradata.
the class MetadataClient method createTrigger.
private FeedPrecondition createTrigger(List<Metric> metrics) {
if (!metrics.isEmpty()) {
FeedPrecondition trigger = new FeedPrecondition();
trigger.addMetrics("", metrics);
return trigger;
} else {
return null;
}
}
use of com.thinkbiganalytics.metadata.rest.model.feed.FeedPrecondition in project kylo by Teradata.
the class DebugController method examplePrecondition.
/**
* returns a new feed precondition model for debugging
*
* @return the precondition model
*/
@GET
@Path("precondition")
@Produces(MediaType.APPLICATION_JSON)
public FeedPrecondition examplePrecondition() {
FeedPrecondition procond = new FeedPrecondition("DependingPrecondition");
procond.addMetrics("Feed dependson on execution of another feed", new FeedExecutedSinceFeed("DependentCategory", "DependentFeed", "ExecutedSinceCategory", "ExecutedSinceFeed"));
return procond;
}
Aggregations