コード例 #1
0
 /** Constructs a snapshot of ingest job progress. */
 private ProgressSnapshot(boolean getIngestTasksSnapshot) {
   dataSourceModule = null;
   fileIngestRunning = false;
   fileIngestStartTime = null;
   dataSourceProcessingSnapshots = new ArrayList<>();
   for (DataSourceIngestJob dataSourceJob : dataSourceJobs.values()) {
     DataSourceIngestJob.Snapshot snapshot = dataSourceJob.getSnapshot(getIngestTasksSnapshot);
     dataSourceProcessingSnapshots.add(new DataSourceProcessingSnapshot(snapshot));
     if (null == dataSourceModule) {
       DataSourceIngestPipeline.PipelineModule module =
           snapshot.getDataSourceLevelIngestModule();
       if (null != module) {
         dataSourceModule =
             new DataSourceIngestModuleHandle(dataSourceJobs.get(snapshot.getJobId()), module);
       }
     }
     if (snapshot.fileIngestIsRunning()) {
       fileIngestRunning = true;
     }
     Date childFileIngestStartTime = snapshot.fileIngestStartTime();
     if (null != childFileIngestStartTime
         && (null == fileIngestStartTime
             || childFileIngestStartTime.before(fileIngestStartTime))) {
       fileIngestStartTime = childFileIngestStartTime;
     }
   }
   this.jobCancelled = cancelled;
 }
コード例 #2
0
 /**
  * Indicates whether or not the processing of the data source that is the subject of this
  * snapshot was canceled.
  *
  * @return True or false.
  */
 public boolean isCancelled() {
   return snapshot.isCancelled();
 }
コード例 #3
0
 /**
  * Gets a list of the display names of any canceled data source level ingest modules.
  *
  * @return A list of canceled data source level ingest module display names, possibly empty.
  */
 public List<String> getCancelledDataSourceIngestModules() {
   return snapshot.getCancelledDataSourceIngestModules();
 }
コード例 #4
0
 /**
  * Gets the name of the data source that is the subject of this snapshot.
  *
  * @return A data source name string.
  */
 public String getDataSource() {
   return snapshot.getDataSource();
 }