Search in sources :

Example 1 with BatchJobInstance

use of com.thinkbiganalytics.metadata.api.jobrepo.job.BatchJobInstance in project kylo by Teradata.

the class JpaBatchJobExecutionProvider method createNewJobExecution.

/**
 * Crate a new job exection from a provenance event
 *
 * @param event the provenance event indicating it is the start of a job
 * @return the job execution
 */
private JpaBatchJobExecution createNewJobExecution(ProvenanceEventRecordDTO event, OpsManagerFeed feed) {
    BatchJobInstance jobInstance = createJobInstance(event);
    JpaBatchJobExecution jobExecution = createJobExecution(jobInstance, event, feed);
    return jobExecution;
}
Also used : BatchJobInstance(com.thinkbiganalytics.metadata.api.jobrepo.job.BatchJobInstance)

Example 2 with BatchJobInstance

use of com.thinkbiganalytics.metadata.api.jobrepo.job.BatchJobInstance in project kylo by Teradata.

the class JpaBatchJobExecutionProvider method createJobInstance.

@Override
public BatchJobInstance createJobInstance(ProvenanceEventRecordDTO event) {
    JpaBatchJobInstance jobInstance = new JpaBatchJobInstance();
    jobInstance.setJobKey(jobKeyGenerator(event));
    jobInstance.setJobName(event.getFeedName());
    // wire this instance to the Feed
    OpsManagerFeed feed = opsManagerFeedRepository.findByName(event.getFeedName());
    jobInstance.setFeed(feed);
    BatchJobInstance batchJobInstance = this.jobInstanceRepository.save(jobInstance);
    return batchJobInstance;
}
Also used : OpsManagerFeed(com.thinkbiganalytics.metadata.api.feed.OpsManagerFeed) JpaOpsManagerFeed(com.thinkbiganalytics.metadata.jpa.feed.JpaOpsManagerFeed) QJpaOpsManagerFeed(com.thinkbiganalytics.metadata.jpa.feed.QJpaOpsManagerFeed) BatchJobInstance(com.thinkbiganalytics.metadata.api.jobrepo.job.BatchJobInstance)

Aggregations

BatchJobInstance (com.thinkbiganalytics.metadata.api.jobrepo.job.BatchJobInstance)2 OpsManagerFeed (com.thinkbiganalytics.metadata.api.feed.OpsManagerFeed)1 JpaOpsManagerFeed (com.thinkbiganalytics.metadata.jpa.feed.JpaOpsManagerFeed)1 QJpaOpsManagerFeed (com.thinkbiganalytics.metadata.jpa.feed.QJpaOpsManagerFeed)1