use of gov.cms.bfd.pipeline.ccw.rif.CcwRifLoadJob in project beneficiary-fhir-data by CMSgov.
the class PipelineApplication method createCcwRifLoadJob.
/**
* @param loadOptions the {@link CcwRifLoadOptions} to use
* @param appState the {@link PipelineApplicationState} to use
* @return a {@link CcwRifLoadJob} instance for the application to use
*/
private static PipelineJob<?> createCcwRifLoadJob(CcwRifLoadOptions loadOptions, PipelineApplicationState appState) {
/*
* Create the services that will be used to handle each stage in the extract, transform, and
* load process.
*/
S3TaskManager s3TaskManager = new S3TaskManager(appState.getMetrics(), loadOptions.getExtractionOptions());
RifFilesProcessor rifProcessor = new RifFilesProcessor();
RifLoader rifLoader = new RifLoader(loadOptions.getLoadOptions(), appState);
/*
* Create the DataSetMonitorListener that will glue those stages together and run them all for
* each data set that is found.
*/
DataSetMonitorListener dataSetMonitorListener = new DefaultDataSetMonitorListener(appState.getMetrics(), PipelineApplication::handleUncaughtException, rifProcessor, rifLoader);
CcwRifLoadJob ccwRifLoadJob = new CcwRifLoadJob(appState.getMetrics(), loadOptions.getExtractionOptions(), s3TaskManager, dataSetMonitorListener);
return ccwRifLoadJob;
}
Aggregations