use of co.cask.cdap.api.flow.FlowletDefinition in project cdap by caskdata.
the class DefaultStore method getFlowletInstances.
@Override
public int getFlowletInstances(ProgramId id, String flowletId) {
return Transactionals.execute(transactional, context -> {
ApplicationSpecification appSpec = getAppSpecOrFail(getAppMetadataStore(context), id);
FlowSpecification flowSpec = getFlowSpecOrFail(id, appSpec);
FlowletDefinition flowletDef = getFlowletDefinitionOrFail(flowSpec, flowletId, id);
return flowletDef.getInstances();
});
}
Aggregations