mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 11:07:43 +00:00
Merge branch '8202-move-ingest-job-cancellation-off-edt' into 8202-kws-search-cancellation-out-of-edt
This commit is contained in:
commit
55e70b172f
@ -541,7 +541,7 @@ final class IngestJobExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determnines which ingets job stage to start in and starts up the ingest
|
* Determnines which ingest job stage to start in and starts up the ingest
|
||||||
* module pipelines.
|
* module pipelines.
|
||||||
*
|
*
|
||||||
* @return A collection of ingest module startup errors, empty on success.
|
* @return A collection of ingest module startup errors, empty on success.
|
||||||
@ -676,14 +676,23 @@ final class IngestJobExecutor {
|
|||||||
|
|
||||||
if (hasFileIngestModules()) {
|
if (hasFileIngestModules()) {
|
||||||
/*
|
/*
|
||||||
* Do a count of the files the data source processor has added
|
* Do an estimate of the total number of files to be analyzed.
|
||||||
* to the case database. This number will be used to estimate
|
* This number will be used to estimate of how many files remain
|
||||||
* how many files remain to be analyzed as each file ingest task
|
* to be analyzed as each file ingest task is completed. The
|
||||||
* is completed.
|
* numbers are estimates because file analysis can add carved
|
||||||
|
* files and/or derived files.
|
||||||
*/
|
*/
|
||||||
if (files.isEmpty()) {
|
if (files.isEmpty()) {
|
||||||
|
/*
|
||||||
|
* Do a count of the files the data source processor has
|
||||||
|
* added to the case database.
|
||||||
|
*/
|
||||||
estimatedFilesToProcess = dataSource.accept(new GetFilesCountVisitor());
|
estimatedFilesToProcess = dataSource.accept(new GetFilesCountVisitor());
|
||||||
} else {
|
} else {
|
||||||
|
/*
|
||||||
|
* Use the number of files in the specified subset of all of
|
||||||
|
* the files for the data source.
|
||||||
|
*/
|
||||||
estimatedFilesToProcess = files.size();
|
estimatedFilesToProcess = files.size();
|
||||||
}
|
}
|
||||||
startFileIngestProgressBar();
|
startFileIngestProgressBar();
|
||||||
@ -794,11 +803,7 @@ final class IngestJobExecutor {
|
|||||||
/*
|
/*
|
||||||
* For ingest job progress reporting purposes, do a count of the
|
* For ingest job progress reporting purposes, do a count of the
|
||||||
* files the data source processor has added to the case
|
* files the data source processor has added to the case
|
||||||
* database. This number will be used to estimate how many files
|
* database.
|
||||||
* remain to be analyzed as each file ingest task is completed.
|
|
||||||
* The estimate will likely be an over-estimate, since some of
|
|
||||||
* the files will have already been "streamed" to this job and
|
|
||||||
* processed.
|
|
||||||
*/
|
*/
|
||||||
estimatedFilesToProcess = dataSource.accept(new GetFilesCountVisitor());
|
estimatedFilesToProcess = dataSource.accept(new GetFilesCountVisitor());
|
||||||
switchFileIngestProgressBarToDeterminate();
|
switchFileIngestProgressBarToDeterminate();
|
||||||
@ -1204,6 +1209,7 @@ final class IngestJobExecutor {
|
|||||||
void addFiles(List<AbstractFile> files) {
|
void addFiles(List<AbstractFile> files) {
|
||||||
if (stage.equals(IngestJobStage.STREAMED_FILE_ANALYSIS_ONLY)
|
if (stage.equals(IngestJobStage.STREAMED_FILE_ANALYSIS_ONLY)
|
||||||
|| stage.equals(IngestJobStage.FILE_AND_HIGH_PRIORITY_DATA_SRC_LEVEL_ANALYSIS)) {
|
|| stage.equals(IngestJobStage.FILE_AND_HIGH_PRIORITY_DATA_SRC_LEVEL_ANALYSIS)) {
|
||||||
|
estimatedFilesToProcess += files.size();
|
||||||
taskScheduler.fastTrackFileIngestTasks(this, files);
|
taskScheduler.fastTrackFileIngestTasks(this, files);
|
||||||
} else {
|
} else {
|
||||||
logErrorMessage(Level.SEVERE, "Adding streaming files to job during stage " + stage.toString() + " not supported");
|
logErrorMessage(Level.SEVERE, "Adding streaming files to job during stage " + stage.toString() + " not supported");
|
||||||
@ -1362,19 +1368,17 @@ final class IngestJobExecutor {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the current file ingest progress bar upon start of analysis of a
|
* Updates the current file ingest progress bar upon start of analysis of a
|
||||||
* file, if the job has not been cancelled, if the job has not been
|
* file, if the job has not been cancelled.
|
||||||
* cancelled.
|
|
||||||
*
|
*
|
||||||
* @param fileName The name of the file.
|
* @param fileName The name of the file.
|
||||||
*/
|
*/
|
||||||
private void updateFileIngestProgressForFileTaskStarted(String fileName) {
|
private void updateFileIngestProgressForFileTaskStarted(String fileName) {
|
||||||
if (usingNetBeansGUI && !jobCancelled) {
|
if (usingNetBeansGUI && !jobCancelled) {
|
||||||
SwingUtilities.invokeLater(() -> {
|
SwingUtilities.invokeLater(() -> {
|
||||||
if (processedFiles <= estimatedFilesToProcess) {
|
/*
|
||||||
fileIngestProgressBar.progress(fileName, (int) processedFiles);
|
* Note that if processedFiles exceeds estimatedFilesToProcess
|
||||||
} else {
|
*/
|
||||||
fileIngestProgressBar.progress(fileName, (int) estimatedFilesToProcess);
|
fileIngestProgressBar.progress(fileName, (int) processedFiles);
|
||||||
}
|
|
||||||
filesInProgress.add(fileName);
|
filesInProgress.add(fileName);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user