Search in sources :

Example 1 with NifiFeedStats

use of com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedStats in project kylo by Teradata.

the class OpsFeedManagerFeedProvider method getLastActiveTimeStamp.

@Override
public DateTime getLastActiveTimeStamp(String feedName) {
    DateTime lastFeedTime = null;
    OpsManagerFeed feed = this.findByName(feedName);
    if (feed.isStream()) {
        NifiFeedStats feedStats = metadataAccess.read(() -> nifiFeedStatisticsProvider.findLatestStatsForFeed(feedName));
        if (feedStats != null && feedStats.getLastActivityTimestamp() != null) {
            lastFeedTime = new DateTime(feedStats.getLastActivityTimestamp());
        } else {
            log.warn("feedStats.getLastActivityTimestamp is null for streaming feed {} ", feedName);
        }
    } else {
        BatchJobExecution jobExecution = metadataAccess.read(() -> batchJobExecutionProvider.findLatestCompletedJobForFeed(feedName));
        if (jobExecution != null) {
            lastFeedTime = jobExecution.getEndTime();
        }
    }
    return lastFeedTime;
}
Also used : OpsManagerFeed(com.thinkbiganalytics.metadata.api.feed.OpsManagerFeed) BatchJobExecution(com.thinkbiganalytics.metadata.api.jobrepo.job.BatchJobExecution) QJpaBatchJobExecution(com.thinkbiganalytics.metadata.jpa.jobrepo.job.QJpaBatchJobExecution) JpaNifiFeedStats(com.thinkbiganalytics.metadata.jpa.jobrepo.nifi.JpaNifiFeedStats) NifiFeedStats(com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedStats) DateTime(org.joda.time.DateTime)

Example 2 with NifiFeedStats

use of com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedStats in project kylo by Teradata.

the class NifiStatsJmsReceiver method saveFeedStats.

/**
 * Save the running totals for the feed
 */
private Map<String, JpaNifiFeedStats> saveFeedStats(AggregatedFeedProcessorStatisticsHolderV2 holder, List<NifiFeedProcessorStats> summaryStats) {
    Map<String, JpaNifiFeedStats> feedStatsMap = new HashMap<>();
    if (summaryStats != null) {
        Map<String, Long> feedLatestTimestamp = summaryStats.stream().collect(Collectors.toMap(NifiFeedProcessorStats::getFeedName, stats -> stats.getMinEventTime().getMillis(), Long::max));
        feedLatestTimestamp.entrySet().stream().forEach(e -> {
            String feedName = e.getKey();
            Long timestamp = e.getValue();
            JpaNifiFeedStats stats = feedStatsMap.computeIfAbsent(feedName, name -> new JpaNifiFeedStats(feedName));
            OpsManagerFeed opsManagerFeed = provenanceEventFeedUtil.getFeed(feedName);
            if (opsManagerFeed != null) {
                stats.setFeedId(new JpaNifiFeedStats.OpsManagerFeedId(opsManagerFeed.getId().toString()));
            }
            stats.setLastActivityTimestamp(timestamp);
        });
    }
    if (holder.getProcessorIdRunningFlows() != null) {
        holder.getProcessorIdRunningFlows().entrySet().stream().forEach(e -> {
            String feedProcessorId = e.getKey();
            Long runningCount = e.getValue();
            // ensure not null
            String feedName = provenanceEventFeedUtil.getFeedName(feedProcessorId);
            if (StringUtils.isNotBlank(feedName)) {
                JpaNifiFeedStats stats = feedStatsMap.computeIfAbsent(feedName, name -> new JpaNifiFeedStats(feedName));
                OpsManagerFeed opsManagerFeed = provenanceEventFeedUtil.getFeed(feedName);
                if (opsManagerFeed != null) {
                    stats.setFeedId(new JpaNifiFeedStats.OpsManagerFeedId(opsManagerFeed.getId().toString()));
                    stats.setStream(opsManagerFeed.isStream());
                }
                stats.addRunningFeedFlows(runningCount);
                if (holder instanceof AggregatedFeedProcessorStatisticsHolderV3) {
                    stats.setTime(((AggregatedFeedProcessorStatisticsHolderV3) holder).getTimestamp());
                    if (stats.getLastActivityTimestamp() == null) {
                        stats.setLastActivityTimestamp(((AggregatedFeedProcessorStatisticsHolderV3) holder).getTimestamp());
                    }
                } else {
                    stats.setTime(DateTime.now().getMillis());
                }
                if (stats.getLastActivityTimestamp() == null) {
                    log.warn("The JpaNifiFeedStats.lastActivityTimestamp for the feed {} is NULL.  The JMS Class was: {}", feedName, holder.getClass().getSimpleName());
                }
            }
        });
    }
    // group stats to save together by feed name
    if (!feedStatsMap.isEmpty()) {
        // only save those that have changed
        List<NifiFeedStats> updatedStats = feedStatsMap.entrySet().stream().map(e -> e.getValue()).collect(Collectors.toList());
        // if the running flows are 0 and its streaming we should try back to see if this feed is running or not
        updatedStats.stream().filter(s -> s.isStream()).forEach(stats -> {
            latestStatsCache.put(stats.getFeedName(), (JpaNifiFeedStats) stats);
            if (stats.getRunningFeedFlows() == 0L) {
                batchJobExecutionProvider.markStreamingFeedAsStopped(stats.getFeedName());
            } else {
                batchJobExecutionProvider.markStreamingFeedAsStarted(stats.getFeedName());
            }
        });
        nifiFeedStatisticsProvider.saveLatestFeedStats(updatedStats);
    }
    return feedStatsMap;
}
Also used : JpaNifiFeedStats(com.thinkbiganalytics.metadata.jpa.jobrepo.nifi.JpaNifiFeedStats) DateTimeZone(org.joda.time.DateTimeZone) LoadingCache(com.google.common.cache.LoadingCache) JobScheduler(com.thinkbiganalytics.scheduler.JobScheduler) ClusterServiceMessageReceiver(com.thinkbiganalytics.cluster.ClusterServiceMessageReceiver) ProvenanceEventRecordDTOHolder(com.thinkbiganalytics.nifi.provenance.model.ProvenanceEventRecordDTOHolder) LoggerFactory(org.slf4j.LoggerFactory) AggregatedFeedProcessorStatistics(com.thinkbiganalytics.nifi.provenance.model.stats.AggregatedFeedProcessorStatistics) NifiFeedProcessorStats(com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedProcessorStats) StringUtils(org.apache.commons.lang3.StringUtils) Queues(com.thinkbiganalytics.jms.Queues) NifiFeedProcessorErrors(com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedProcessorErrors) NifiFeedProcessorStatisticsProvider(com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedProcessorStatisticsProvider) DefaultTriggerIdentifier(com.thinkbiganalytics.scheduler.model.DefaultTriggerIdentifier) Map(java.util.Map) OpsManagerFeed(com.thinkbiganalytics.metadata.api.feed.OpsManagerFeed) JmsListener(org.springframework.jms.annotation.JmsListener) MetadataAccess(com.thinkbiganalytics.metadata.api.MetadataAccess) NifiFeedStatisticsProvider(com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedStatisticsProvider) BulletinDTO(org.apache.nifi.web.api.dto.BulletinDTO) AggregatedFeedProcessorStatisticsHolderV3(com.thinkbiganalytics.nifi.provenance.model.stats.AggregatedFeedProcessorStatisticsHolderV3) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) AggregatedFeedProcessorStatisticsHolderV2(com.thinkbiganalytics.nifi.provenance.model.stats.AggregatedFeedProcessorStatisticsHolderV2) ObjectAlreadyExistsException(org.quartz.ObjectAlreadyExistsException) Set(java.util.Set) ClusterMessage(com.thinkbiganalytics.cluster.ClusterMessage) Collectors(java.util.stream.Collectors) CacheLoader(com.google.common.cache.CacheLoader) BatchJobExecutionProvider(com.thinkbiganalytics.metadata.api.jobrepo.job.BatchJobExecutionProvider) List(java.util.List) AggregatedFeedProcessorStatisticsV2(com.thinkbiganalytics.nifi.provenance.model.stats.AggregatedFeedProcessorStatisticsV2) GroupedStatsV2(com.thinkbiganalytics.nifi.provenance.model.stats.GroupedStatsV2) DefaultJobIdentifier(com.thinkbiganalytics.scheduler.model.DefaultJobIdentifier) PostConstruct(javax.annotation.PostConstruct) ClusterService(com.thinkbiganalytics.cluster.ClusterService) CacheBuilder(com.google.common.cache.CacheBuilder) Queue(java.util.Queue) QuartzScheduler(com.thinkbiganalytics.scheduler.QuartzScheduler) AggregatedFeedProcessorStatisticsHolder(com.thinkbiganalytics.nifi.provenance.model.stats.AggregatedFeedProcessorStatisticsHolder) SerializationUtils(org.apache.commons.lang.SerializationUtils) HashMap(java.util.HashMap) JpaNifiFeedStats(com.thinkbiganalytics.metadata.jpa.jobrepo.nifi.JpaNifiFeedStats) ArrayList(java.util.ArrayList) Value(org.springframework.beans.factory.annotation.Value) HashSet(java.util.HashSet) Inject(javax.inject.Inject) SchedulerException(org.quartz.SchedulerException) EvictingQueue(com.google.common.collect.EvictingQueue) JmsConstants(com.thinkbiganalytics.jms.JmsConstants) ProvenanceEventRecordDTO(com.thinkbiganalytics.nifi.provenance.model.ProvenanceEventRecordDTO) JobIdentifier(com.thinkbiganalytics.scheduler.JobIdentifier) Logger(org.slf4j.Logger) DateTime(org.joda.time.DateTime) NifiFeedStats(com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedStats) JpaNifiFeedProcessorStats(com.thinkbiganalytics.metadata.jpa.jobrepo.nifi.JpaNifiFeedProcessorStats) TriggerIdentifier(com.thinkbiganalytics.scheduler.TriggerIdentifier) Collections(java.util.Collections) GroupedStats(com.thinkbiganalytics.nifi.provenance.model.stats.GroupedStats) OpsManagerFeed(com.thinkbiganalytics.metadata.api.feed.OpsManagerFeed) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap) JpaNifiFeedStats(com.thinkbiganalytics.metadata.jpa.jobrepo.nifi.JpaNifiFeedStats) NifiFeedStats(com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedStats) AggregatedFeedProcessorStatisticsHolderV3(com.thinkbiganalytics.nifi.provenance.model.stats.AggregatedFeedProcessorStatisticsHolderV3)

Example 3 with NifiFeedStats

use of com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedStats in project kylo by Teradata.

the class NifiFeedProcessorStatisticsRestControllerV2 method findFeedStats.

@GET
@Path("/{feedName}")
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Gets the statistics for the specified feed.")
@ApiResponses(@ApiResponse(code = 200, message = "Returns the feed statistics.", response = com.thinkbiganalytics.metadata.rest.jobrepo.nifi.NifiFeedProcessorStats.class, responseContainer = "List"))
public Response findFeedStats(@PathParam("feedName") String feedName, @QueryParam("from") Long fromMillis, @QueryParam("to") Long toMillis) {
    this.accessController.checkPermission(AccessController.SERVICES, OperationsAccessControl.ACCESS_OPS);
    final DateTime endTime = getToDateTime(toMillis);
    final DateTime startTime = getFromDateTime(fromMillis);
    return metadataAccess.read(() -> {
        NiFiFeedProcessorStatsContainer statsContainer = new NiFiFeedProcessorStatsContainer(startTime, endTime);
        NifiFeedStats feedStats = nifiFeedStatisticsProvider.findLatestStatsForFeed(feedName);
        List<? extends NifiFeedProcessorStats> list = statsProvider.findForFeedStatisticsGroupedByTime(feedName, statsContainer.getStartTime(), statsContainer.getEndTime());
        List<com.thinkbiganalytics.metadata.rest.jobrepo.nifi.NifiFeedProcessorStats> model = NifiFeedProcessorStatsTransform.toModel(list);
        statsContainer.setStats(model);
        if (feedStats != null) {
            statsContainer.setRunningFlows(feedStats.getRunningFeedFlows());
        } else {
            // calc diff from finished - started
            Long started = model.stream().mapToLong(s -> s.getJobsStarted()).sum();
            Long finished = model.stream().mapToLong(s -> s.getJobsFinished()).sum();
            Long running = started - finished;
            if (running < 0) {
                running = 0L;
            }
            statsContainer.setRunningFlows(running);
        }
        return Response.ok(statsContainer).build();
    });
}
Also used : Arrays(java.util.Arrays) PathParam(javax.ws.rs.PathParam) NifiStatsJmsReceiver(com.thinkbiganalytics.metadata.jobrepo.nifi.provenance.NifiStatsJmsReceiver) Produces(javax.ws.rs.Produces) NiFiFeedProcessorErrorsContainer(com.thinkbiganalytics.metadata.rest.jobrepo.nifi.NiFiFeedProcessorErrorsContainer) GET(javax.ws.rs.GET) Path(javax.ws.rs.Path) Autowired(org.springframework.beans.factory.annotation.Autowired) HashMap(java.util.HashMap) ApiResponses(io.swagger.annotations.ApiResponses) NifiFeedProcessorStats(com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedProcessorStats) NifiFeedProcessorErrors(com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedProcessorErrors) Inject(javax.inject.Inject) NiFiFeedProcessorStatsContainer(com.thinkbiganalytics.metadata.rest.jobrepo.nifi.NiFiFeedProcessorStatsContainer) ApiOperation(io.swagger.annotations.ApiOperation) MediaType(javax.ws.rs.core.MediaType) QueryParam(javax.ws.rs.QueryParam) NifiFeedProcessorStatisticsProvider(com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedProcessorStatisticsProvider) Map(java.util.Map) AccessController(com.thinkbiganalytics.security.AccessController) Api(io.swagger.annotations.Api) MetadataAccess(com.thinkbiganalytics.metadata.api.MetadataAccess) NifiFeedStatisticsProvider(com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedStatisticsProvider) NifiFeedProcessorStatsTransform(com.thinkbiganalytics.metadata.rest.jobrepo.nifi.NifiFeedProcessorStatsTransform) OperationsAccessControl(com.thinkbiganalytics.jobrepo.security.OperationsAccessControl) LabelValue(com.thinkbiganalytics.rest.model.LabelValue) DateTime(org.joda.time.DateTime) NifiFeedStats(com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedStats) Collectors(java.util.stream.Collectors) List(java.util.List) Response(javax.ws.rs.core.Response) ApiResponse(io.swagger.annotations.ApiResponse) NiFiFeedProcessorStatsContainer(com.thinkbiganalytics.metadata.rest.jobrepo.nifi.NiFiFeedProcessorStatsContainer) NifiFeedStats(com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedStats) NifiFeedProcessorStats(com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedProcessorStats) DateTime(org.joda.time.DateTime) Path(javax.ws.rs.Path) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET) ApiOperation(io.swagger.annotations.ApiOperation) ApiResponses(io.swagger.annotations.ApiResponses)

Example 4 with NifiFeedStats

use of com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedStats in project kylo by Teradata.

the class OpsFeedManagerFeedProvider method save.

@Override
public OpsManagerFeed save(OpsManagerFeed.ID feedId, String systemName, boolean isStream, Long timeBetweenBatchJobs) {
    OpsManagerFeed feed = repository.findByIdWithoutAcl(feedId);
    if (feed == null) {
        if (ensureUniqueFeedName) {
            ensureAndRemoveDuplicateFeedsWithTheSameName(systemName, feedId);
        }
        feed = new JpaOpsManagerFeed();
        ((JpaOpsManagerFeed) feed).setName(systemName);
        ((JpaOpsManagerFeed) feed).setId((OpsManagerFeedId) feedId);
        ((JpaOpsManagerFeed) feed).setStream(isStream);
        ((JpaOpsManagerFeed) feed).setTimeBetweenBatchJobs(timeBetweenBatchJobs);
        NifiFeedStats stats = feedStatisticsProvider.findLatestStatsForFeedWithoutAccessControl(systemName);
        if (stats == null) {
            JpaNifiFeedStats newStats = new JpaNifiFeedStats(systemName, new JpaNifiFeedStats.OpsManagerFeedId(feedId.toString()));
            newStats.setRunningFeedFlows(0L);
            feedStatisticsProvider.saveLatestFeedStats(Lists.newArrayList(newStats));
        }
    } else {
        ((JpaOpsManagerFeed) feed).setStream(isStream);
        ((JpaOpsManagerFeed) feed).setTimeBetweenBatchJobs(timeBetweenBatchJobs);
    }
    feed = save(feed);
    return feed;
}
Also used : JpaNifiFeedStats(com.thinkbiganalytics.metadata.jpa.jobrepo.nifi.JpaNifiFeedStats) OpsManagerFeed(com.thinkbiganalytics.metadata.api.feed.OpsManagerFeed) JpaNifiFeedStats(com.thinkbiganalytics.metadata.jpa.jobrepo.nifi.JpaNifiFeedStats) NifiFeedStats(com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedStats)

Example 5 with NifiFeedStats

use of com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedStats in project kylo by Teradata.

the class JpaBatchJobExecutionProvider method getJobStatusCount.

/**
 * Get count of Jobs grouped by Status
 * Streaming Feeds are given a count of 1 if they are running, regardless of the number of active running flows
 */
@Override
public List<JobStatusCount> getJobStatusCount(String filter) {
    QJpaBatchJobExecution jobExecution = QJpaBatchJobExecution.jpaBatchJobExecution;
    QJpaBatchJobInstance jobInstance = QJpaBatchJobInstance.jpaBatchJobInstance;
    QJpaOpsManagerFeed feed = QJpaOpsManagerFeed.jpaOpsManagerFeed;
    BooleanBuilder whereBuilder = new BooleanBuilder();
    if (StringUtils.isNotBlank(filter)) {
        whereBuilder.and(GenericQueryDslFilter.buildFilter(jobExecution, filter));
    }
    ConstructorExpression<JpaBatchJobExecutionStatusCounts> expr = Projections.constructor(JpaBatchJobExecutionStatusCounts.class, JobStatusDslQueryExpressionBuilder.jobState().as("status"), jobExecution.jobExecutionId.count().as("count"));
    JPAQuery<?> query = factory.select(expr).from(jobExecution).innerJoin(jobInstance).on(jobExecution.jobInstance.jobInstanceId.eq(jobInstance.jobInstanceId)).innerJoin(feed).on(jobInstance.feed.id.eq(feed.id)).where(whereBuilder.and(feed.isStream.eq(false)).and(FeedAclIndexQueryAugmentor.generateExistsExpression(feed.id, controller.isEntityAccessControlled()))).groupBy(jobExecution.status);
    List<JobStatusCount> stats = (List<JobStatusCount>) query.fetch();
    // merge in streaming feed stats
    List<? extends NifiFeedStats> streamingFeedStats = feedStatisticsProvider.findFeedStats(true);
    if (streamingFeedStats != null) {
        if (stats == null) {
            stats = new ArrayList<>();
        }
        Long runningCount = streamingFeedStats.stream().filter(s -> s.getRunningFeedFlows() > 0L).count();
        if (runningCount > 0) {
            JobStatusCount runningStatusCount = stats.stream().filter(s -> s.getStatus().equalsIgnoreCase(BatchJobExecution.RUNNING_DISPLAY_STATUS)).findFirst().orElse(null);
            if (runningStatusCount != null) {
                runningCount = runningStatusCount.getCount() + runningCount;
                runningStatusCount.setCount(runningCount);
            } else {
                JpaBatchJobExecutionStatusCounts runningStreamingFeedCounts = new JpaBatchJobExecutionStatusCounts();
                runningStreamingFeedCounts.setCount(runningCount);
                runningStreamingFeedCounts.setStatus(BatchJobExecution.RUNNING_DISPLAY_STATUS);
                stats.add(runningStreamingFeedCounts);
            }
        }
    }
    return stats;
}
Also used : AlertManager(com.thinkbiganalytics.alerts.spi.AlertManager) JobStatusCount(com.thinkbiganalytics.metadata.api.jobrepo.job.JobStatusCount) BatchRelatedFlowFile(com.thinkbiganalytics.metadata.api.jobrepo.job.BatchRelatedFlowFile) ClusterServiceMessageReceiver(com.thinkbiganalytics.cluster.ClusterServiceMessageReceiver) JpaNifiEventJobExecution(com.thinkbiganalytics.metadata.jpa.jobrepo.nifi.JpaNifiEventJobExecution) LoggerFactory(org.slf4j.LoggerFactory) Autowired(org.springframework.beans.factory.annotation.Autowired) Projections(com.querydsl.core.types.Projections) FeedAclIndexQueryAugmentor(com.thinkbiganalytics.metadata.jpa.feed.FeedAclIndexQueryAugmentor) StringUtils(org.apache.commons.lang3.StringUtils) GenericQueryDslFilter(com.thinkbiganalytics.metadata.jpa.support.GenericQueryDslFilter) SecurityRole(com.thinkbiganalytics.security.role.SecurityRole) BatchAndStreamingJobStatusCount(com.thinkbiganalytics.metadata.api.jobrepo.job.BatchAndStreamingJobStatusCount) Map(java.util.Map) AccessController(com.thinkbiganalytics.security.AccessController) OpsManagerFeed(com.thinkbiganalytics.metadata.api.feed.OpsManagerFeed) Pageable(org.springframework.data.domain.Pageable) BigInteger(java.math.BigInteger) MetadataAccess(com.thinkbiganalytics.metadata.api.MetadataAccess) SecurityContextHolder(org.springframework.security.core.context.SecurityContextHolder) NifiFeedStatisticsProvider(com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedStatisticsProvider) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Set(java.util.Set) ClusterMessage(com.thinkbiganalytics.cluster.ClusterMessage) Page(org.springframework.data.domain.Page) Expression(com.querydsl.core.types.Expression) MetadataEventService(com.thinkbiganalytics.metadata.api.event.MetadataEventService) Collectors(java.util.stream.Collectors) JPAExpressions(com.querydsl.jpa.JPAExpressions) JpaOpsManagerFeed(com.thinkbiganalytics.metadata.jpa.feed.JpaOpsManagerFeed) JPAQuery(com.querydsl.jpa.impl.JPAQuery) BatchJobExecutionProvider(com.thinkbiganalytics.metadata.api.jobrepo.job.BatchJobExecutionProvider) ReadablePeriod(org.joda.time.ReadablePeriod) List(java.util.List) ExecutionConstants(com.thinkbiganalytics.metadata.api.jobrepo.ExecutionConstants) NoSuchAlgorithmException(java.security.NoSuchAlgorithmException) PostConstruct(javax.annotation.PostConstruct) ClusterService(com.thinkbiganalytics.cluster.ClusterService) BatchJobExecution(com.thinkbiganalytics.metadata.api.jobrepo.job.BatchJobExecution) CommonFilterTranslations(com.thinkbiganalytics.metadata.jpa.support.CommonFilterTranslations) Predicate(com.querydsl.core.types.Predicate) SearchCriteria(com.thinkbiganalytics.metadata.api.SearchCriteria) Authentication(org.springframework.security.core.Authentication) UnsupportedEncodingException(java.io.UnsupportedEncodingException) FeedOperationBatchStatusChange(com.thinkbiganalytics.metadata.api.event.feed.FeedOperationBatchStatusChange) BatchStepExecutionProvider(com.thinkbiganalytics.metadata.api.jobrepo.step.BatchStepExecutionProvider) Stopwatch(com.google.common.base.Stopwatch) MessageDigest(java.security.MessageDigest) DateTimeUtil(com.thinkbiganalytics.DateTimeUtil) BooleanBuilder(com.querydsl.core.BooleanBuilder) QOpsManagerFeedId(com.thinkbiganalytics.metadata.jpa.feed.QOpsManagerFeedId) BooleanUtils(org.apache.commons.lang3.BooleanUtils) HashMap(java.util.HashMap) JPQLQuery(com.querydsl.jpa.JPQLQuery) DefaultAlertChangeEventContent(com.thinkbiganalytics.alerts.spi.DefaultAlertChangeEventContent) QueryDslFetchJoin(com.thinkbiganalytics.metadata.jpa.support.QueryDslFetchJoin) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) Inject(javax.inject.Inject) AlertProvider(com.thinkbiganalytics.alerts.api.AlertProvider) RoleSetExposingSecurityExpressionRoot(com.thinkbiganalytics.metadata.config.RoleSetExposingSecurityExpressionRoot) NifiRelatedRootFlowFilesRepository(com.thinkbiganalytics.metadata.jpa.jobrepo.nifi.NifiRelatedRootFlowFilesRepository) Alert(com.thinkbiganalytics.alerts.api.Alert) CheckDataStepConstants(com.thinkbiganalytics.jobrepo.common.constants.CheckDataStepConstants) Service(org.springframework.stereotype.Service) QueryDslPagingSupport(com.thinkbiganalytics.metadata.jpa.support.QueryDslPagingSupport) Named(javax.inject.Named) ProvenanceEventRecordDTO(com.thinkbiganalytics.nifi.provenance.model.ProvenanceEventRecordDTO) FeedOperation(com.thinkbiganalytics.metadata.api.op.FeedOperation) Logger(org.slf4j.Logger) BatchJobInstance(com.thinkbiganalytics.metadata.api.jobrepo.job.BatchJobInstance) FeedNameUtil(com.thinkbiganalytics.support.FeedNameUtil) OptimisticLockException(javax.persistence.OptimisticLockException) ConstructorExpression(com.querydsl.core.types.ConstructorExpression) DateTime(org.joda.time.DateTime) NifiFeedStats(com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedStats) JPAQueryFactory(com.querydsl.jpa.impl.JPAQueryFactory) OperationalAlerts(com.thinkbiganalytics.metadata.api.alerts.OperationalAlerts) QJpaNifiFeedStats(com.thinkbiganalytics.metadata.jpa.jobrepo.nifi.QJpaNifiFeedStats) TimeUnit(java.util.concurrent.TimeUnit) JobStatusDslQueryExpressionBuilder(com.thinkbiganalytics.metadata.jpa.support.JobStatusDslQueryExpressionBuilder) QJpaOpsManagerFeed(com.thinkbiganalytics.metadata.jpa.feed.QJpaOpsManagerFeed) FeedConstants(com.thinkbiganalytics.jobrepo.common.constants.FeedConstants) Collections(java.util.Collections) OpsManagerFeedRepository(com.thinkbiganalytics.metadata.jpa.feed.OpsManagerFeedRepository) QJpaOpsManagerFeed(com.thinkbiganalytics.metadata.jpa.feed.QJpaOpsManagerFeed) JobStatusCount(com.thinkbiganalytics.metadata.api.jobrepo.job.JobStatusCount) BatchAndStreamingJobStatusCount(com.thinkbiganalytics.metadata.api.jobrepo.job.BatchAndStreamingJobStatusCount) BooleanBuilder(com.querydsl.core.BooleanBuilder) List(java.util.List) ArrayList(java.util.ArrayList)

Aggregations

NifiFeedStats (com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedStats)5 OpsManagerFeed (com.thinkbiganalytics.metadata.api.feed.OpsManagerFeed)4 MetadataAccess (com.thinkbiganalytics.metadata.api.MetadataAccess)3 NifiFeedStatisticsProvider (com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedStatisticsProvider)3 DateTime (org.joda.time.DateTime)3 ClusterMessage (com.thinkbiganalytics.cluster.ClusterMessage)2 ClusterService (com.thinkbiganalytics.cluster.ClusterService)2 ClusterServiceMessageReceiver (com.thinkbiganalytics.cluster.ClusterServiceMessageReceiver)2 BatchJobExecution (com.thinkbiganalytics.metadata.api.jobrepo.job.BatchJobExecution)2 BatchJobExecutionProvider (com.thinkbiganalytics.metadata.api.jobrepo.job.BatchJobExecutionProvider)2 NifiFeedProcessorErrors (com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedProcessorErrors)2 NifiFeedProcessorStatisticsProvider (com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedProcessorStatisticsProvider)2 NifiFeedProcessorStats (com.thinkbiganalytics.metadata.api.jobrepo.nifi.NifiFeedProcessorStats)2 JpaNifiFeedStats (com.thinkbiganalytics.metadata.jpa.jobrepo.nifi.JpaNifiFeedStats)2 HashMap (java.util.HashMap)2 List (java.util.List)2 Map (java.util.Map)2 Collectors (java.util.stream.Collectors)2 Inject (javax.inject.Inject)2 Stopwatch (com.google.common.base.Stopwatch)1