public FlowActivityEntity(TimelineEntity entity) { super(entity); if (!TimelineEntityType.YARN_FLOW_ACTIVITY.matches(entity.getType())) { throw new IllegalArgumentException("Incompatible entity type: " + getId()); } // set config to null setConfigs(null); }
/** * Creates a timeline entity reader instance for reading a single entity with * the specified input. * * @param context Reader context which defines the scope in which query has to * be made. * @param dataToRetrieve Data to retrieve for each entity. * @return An implementation of <cite>TimelineEntityReader</cite> object * depending on entity type. */ public static TimelineEntityReader createSingleEntityReader( TimelineReaderContext context, TimelineDataToRetrieve dataToRetrieve) { // currently the types that are handled separate from the generic entity // table are application, flow run, and flow activity entities if (TimelineEntityType.YARN_APPLICATION.matches(context.getEntityType())) { return new ApplicationEntityReader(context, dataToRetrieve); } else if (TimelineEntityType. YARN_FLOW_RUN.matches(context.getEntityType())) { return new FlowRunEntityReader(context, dataToRetrieve); } else if (TimelineEntityType. YARN_FLOW_ACTIVITY.matches(context.getEntityType())) { return new FlowActivityEntityReader(context, dataToRetrieve); } else { // assume we're dealing with a generic entity read return new GenericEntityReader(context, dataToRetrieve); } }
if (TimelineEntityType.YARN_APPLICATION.matches(context.getEntityType())) { return new ApplicationEntityReader(context, filters, dataToRetrieve); } else if (TimelineEntityType. YARN_FLOW_ACTIVITY.matches(context.getEntityType())) { return new FlowActivityEntityReader(context, filters, dataToRetrieve); } else if (TimelineEntityType. YARN_FLOW_RUN.matches(context.getEntityType())) { return new FlowRunEntityReader(context, filters, dataToRetrieve); } else {