Merge pull request #636 from rcordovano/ingest_scheduler_fixes

Ingest scheduler fixes
This commit is contained in:
Richard Cordovano 2014-04-21 10:24:01 -04:00
commit df76d75de7
5 changed files with 179 additions and 279 deletions

View File

@ -52,10 +52,6 @@ Ensure the Case drive has at least 1GB free space and restart ingest.
IngestJobConfigurationPanel.advancedButton.text=Advanced IngestJobConfigurationPanel.advancedButton.text=Advanced
IngestJobConfigurationPanel.advancedButton.actionCommand=Advanced IngestJobConfigurationPanel.advancedButton.actionCommand=Advanced
IngestScheduler.DataSourceScheduler.toString.size=DataSourceQueue, size\: IngestScheduler.DataSourceScheduler.toString.size=DataSourceQueue, size\:
IngestScheduler.DataSourceScheduler.exception.remove.msg=Removing of scheduled data source ingest tasks is not supported.
IngestScheduler.DataSourceScheduler.exception.next.msg=There is no data source tasks in the queue, check hasNext()
IngestScheduler.remove.exception.notSupported.msg=Not supported.
IngestScheduler.FileTask.next.exception.msg=No next ProcessTask, check hasNext() first\!
IngestScheduler.FileSched.toString.curFiles.text=\ IngestScheduler.FileSched.toString.curFiles.text=\
CurFiles, size\: CurFiles, size\:
IngestScheduler.FileSched.toString.curDirs.text=\ IngestScheduler.FileSched.toString.curDirs.text=\

View File

@ -1,68 +1,64 @@
CTL_IngestMessageTopComponent=\u30E1\u30C3\u30BB\u30FC\u30B8 CTL_IngestMessageTopComponent=\u30e1\u30c3\u30bb\u30fc\u30b8
HINT_IngestMessageTopComponent=\u30E1\u30C3\u30BB\u30FC\u30B8\u30A6\u30A3\u30F3\u30C9\u30A6 HINT_IngestMessageTopComponent=\u30e1\u30c3\u30bb\u30fc\u30b8\u30a6\u30a3\u30f3\u30c9\u30a6
IngestDialog.closeButton.title=\u9589\u3058\u308B IngestDialog.closeButton.title=\u9589\u3058\u308b
IngestDialog.startButton.title=\u30B9\u30BF\u30FC\u30C8 IngestDialog.startButton.title=\u30b9\u30bf\u30fc\u30c8
IngestDialog.title.text=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30E2\u30B8\u30E5\u30FC\u30EB IngestDialog.title.text=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30e2\u30b8\u30e5\u30fc\u30eb
IngestJob.progress.cancelling={0}\uFF08\u30AD\u30E3\u30F3\u30BB\u30EB\u4E2D\u2026\uFF09 IngestJob.progress.cancelling={0}\uff08\u30ad\u30e3\u30f3\u30bb\u30eb\u4e2d\u2026\uff09
IngestJob.progress.dataSourceIngest.displayName={0}\u306E\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u3092\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8 IngestJob.progress.dataSourceIngest.displayName={0}\u306e\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3092\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8
IngestJob.progress.fileIngest.displayName={0}\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8 IngestJob.progress.fileIngest.displayName={0}\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8
IngestJobConfigurationPanel.advancedButton.actionCommand=\u30A2\u30C9\u30D0\u30F3\u30B9 IngestJobConfigurationPanel.advancedButton.actionCommand=\u30a2\u30c9\u30d0\u30f3\u30b9
IngestJobConfigurationPanel.advancedButton.text=\u30A2\u30C9\u30D0\u30F3\u30B9 IngestJobConfigurationPanel.advancedButton.text=\u30a2\u30c9\u30d0\u30f3\u30b9
IngestJobConfigurationPanel.processUnallocCheckbox.text=\u672A\u5272\u308A\u5F53\u3066\u9818\u57DF\u306E\u51E6\u7406 IngestJobConfigurationPanel.processUnallocCheckbox.text=\u672a\u5272\u308a\u5f53\u3066\u9818\u57df\u306e\u51e6\u7406
IngestJobConfigurationPanel.processUnallocCheckbox.toolTipText=\u524A\u9664\u3055\u308C\u305F\u30D5\u30A1\u30A4\u30EB\u7B49\u306E\u672A\u5272\u308A\u5F53\u3066\u9818\u57DF\u3092\u51E6\u7406\u3002\u3088\u308A\u5B8C\u5168\u306A\u7D50\u679C\u304C\u51FA\u307E\u3059\u304C\u3001\u5927\u304D\u3044\u30A4\u30E1\u30FC\u30B8\u3067\u306F\u51E6\u7406\u6642\u9593\u304C\u9577\u304F\u306A\u308B\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u3002 IngestJobConfigurationPanel.processUnallocCheckbox.toolTipText=\u524a\u9664\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u7b49\u306e\u672a\u5272\u308a\u5f53\u3066\u9818\u57df\u3092\u51e6\u7406\u3002\u3088\u308a\u5b8c\u5168\u306a\u7d50\u679c\u304c\u51fa\u307e\u3059\u304c\u3001\u5927\u304d\u3044\u30a4\u30e1\u30fc\u30b8\u3067\u306f\u51e6\u7406\u6642\u9593\u304c\u9577\u304f\u306a\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002
IngestManager.moduleErr=\u30E2\u30B8\u30E5\u30FC\u30EB\u30A8\u30E9\u30FC IngestManager.moduleErr=\u30e2\u30b8\u30e5\u30fc\u30eb\u30a8\u30e9\u30fc
IngestManager.moduleErr.errListenToUpdates.msg=Ingest Manager\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u3092\u78BA\u8A8D\u4E2D\u306B\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u30A8\u30E9\u30FC\u3092\u8D77\u3053\u3057\u307E\u3057\u305F\u3002\u3069\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u304B\u30ED\u30B0\u3067\u78BA\u8A8D\u3057\u3066\u4E0B\u3055\u3044\u3002\u4E00\u90E8\u306E\u30C7\u30FC\u30BF\u304C\u4E0D\u5B8C\u5168\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u3002 IngestManager.moduleErr.errListenToUpdates.msg=Ingest Manager\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u78ba\u8a8d\u4e2d\u306b\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u30a8\u30e9\u30fc\u3092\u8d77\u3053\u3057\u307e\u3057\u305f\u3002\u3069\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u304b\u30ed\u30b0\u3067\u78ba\u8a8d\u3057\u3066\u4e0b\u3055\u3044\u3002\u4e00\u90e8\u306e\u30c7\u30fc\u30bf\u304c\u4e0d\u5b8c\u5168\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002
IngestManager.StartIngestJobsTask.run.cancelling={0}\uFF08\u30AD\u30E3\u30F3\u30BB\u30EB\u4E2D\u2026\uFF09 IngestManager.StartIngestJobsTask.run.cancelling={0}\uff08\u30ad\u30e3\u30f3\u30bb\u30eb\u4e2d\u2026\uff09
IngestManager.StartIngestJobsTask.run.catchException.msg=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u306E\u958B\u59CB\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u7D50\u679C\u304C\u4E00\u90E8\u306E\u3082\u306E IngestManager.StartIngestJobsTask.run.catchException.msg=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u306e\u958b\u59cb\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u7d50\u679c\u304c\u4e00\u90e8\u306e\u3082\u306e
IngestManager.StartIngestJobsTask.run.displayName=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30BF\u30B9\u30AF\u3092\u30AD\u30E5\u30FC\u30A4\u30F3\u30B0 IngestManager.StartIngestJobsTask.run.displayName=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30bf\u30b9\u30af\u3092\u30ad\u30e5\u30fc\u30a4\u30f3\u30b0
IngestMessage.exception.srcSubjDetailsDataNotNull.msg=\u30BD\u30FC\u30B9\u3001\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u3001\u8A73\u7D30\u304A\u3088\u3073\u30C7\u30FC\u30BF\u306F\u30CC\u30EB\u3067\u3042\u3063\u3066\u306F\u3044\u3051\u307E\u305B\u3093 IngestMessage.exception.srcSubjDetailsDataNotNull.msg=\u30bd\u30fc\u30b9\u3001\u30b5\u30d6\u30b8\u30a7\u30af\u30c8\u3001\u8a73\u7d30\u304a\u3088\u3073\u30c7\u30fc\u30bf\u306f\u30cc\u30eb\u3067\u3042\u3063\u3066\u306f\u3044\u3051\u307e\u305b\u3093
IngestMessage.exception.srcSubjNotNull.msg=\u30BD\u30FC\u30B9\u304A\u3088\u3073\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u306F\u30CC\u30EB\u3067\u3042\u3063\u3066\u306F\u3044\u3051\u307E\u305B\u3093 IngestMessage.exception.srcSubjNotNull.msg=\u30bd\u30fc\u30b9\u304a\u3088\u3073\u30b5\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u30cc\u30eb\u3067\u3042\u3063\u3066\u306f\u3044\u3051\u307e\u305b\u3093
IngestMessage.exception.typeSrcSubjNotNull.msg=\u30E1\u30C3\u30BB\u30FC\u30B8\u30BF\u30A4\u30D7\u3001\u30BD\u30FC\u30B9\u304A\u3088\u3073\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u306F\u30CC\u30EB\u3067\u3042\u3063\u3066\u306F\u3044\u3051\u307E\u305B\u3093 IngestMessage.exception.typeSrcSubjNotNull.msg=\u30e1\u30c3\u30bb\u30fc\u30b8\u30bf\u30a4\u30d7\u3001\u30bd\u30fc\u30b9\u304a\u3088\u3073\u30b5\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u30cc\u30eb\u3067\u3042\u3063\u3066\u306f\u3044\u3051\u307e\u305b\u3093
IngestMessage.toString.data.text=\ \u30C7\u30FC\u30BF\uFF1A{0} IngestMessage.toString.data.text=\ \u30c7\u30fc\u30bf\uff1a{0}
IngestMessage.toString.date.text=\ \u65E5\u4ED8\uFF1A{0} IngestMessage.toString.date.text=\ \u65e5\u4ed8\uff1a{0}
IngestMessage.toString.details.text=\ \u8A73\u7D30\uFF1A{0} IngestMessage.toString.details.text=\ \u8a73\u7d30\uff1a{0}
IngestMessage.toString.subject.text=\ \u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\uFF1A{0} IngestMessage.toString.subject.text=\ \u30b5\u30d6\u30b8\u30a7\u30af\u30c8\uff1a{0}
IngestMessage.toString.type.text=\u30BF\u30A4\u30D7\uFF1A{0} IngestMessage.toString.type.text=\u30bf\u30a4\u30d7\uff1a{0}
IngestMessageDetailsPanel.copyMenuItem.text=\u30B3\u30D4\u30FC IngestMessageDetailsPanel.copyMenuItem.text=\u30b3\u30d4\u30fc
IngestMessageDetailsPanel.messageDetailsPane.contentType=\u30C6\u30AD\u30B9\u30C8\uFF0Fhtml IngestMessageDetailsPanel.messageDetailsPane.contentType=\u30c6\u30ad\u30b9\u30c8\uff0fhtml
IngestMessageDetailsPanel.selectAllMenuItem.text=\u3059\u3079\u3066\u9078\u629E IngestMessageDetailsPanel.selectAllMenuItem.text=\u3059\u3079\u3066\u9078\u629e
IngestMessageDetailsPanel.viewArtifactButton.text=\u7D50\u679C\u3078\u79FB\u52D5 IngestMessageDetailsPanel.viewArtifactButton.text=\u7d50\u679c\u3078\u79fb\u52d5
IngestMessageDetailsPanel.viewContentButton.text=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3078\u79FB\u52D5 IngestMessageDetailsPanel.viewContentButton.text=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3078\u79fb\u52d5
IngestMessagePanel.BooleanRenderer.exception.nonBoolVal.msg=\u30D6\u30FC\u30EB\u5024\u3067\u306F\u306A\u3044\u3082\u306E\u306BBooleanRenderer\u3092\u4F7F\u7528\u3057\u3088\u3046\u3068\u3057\u307E\u3057\u305F IngestMessagePanel.BooleanRenderer.exception.nonBoolVal.msg=\u30d6\u30fc\u30eb\u5024\u3067\u306f\u306a\u3044\u3082\u306e\u306bBooleanRenderer\u3092\u4f7f\u7528\u3057\u3088\u3046\u3068\u3057\u307e\u3057\u305f
IngestMessagePanel.DateRenderer.exception.nonDateVal.text=\u65E5\u4ED8\u3067\u306F\u306A\u3044\u3082\u306E\u306BDateRenderer\u3092\u4F7F\u7528\u3057\u3088\u3046\u3068\u3057\u307E\u3057\u305F\u3002 IngestMessagePanel.DateRenderer.exception.nonDateVal.text=\u65e5\u4ed8\u3067\u306f\u306a\u3044\u3082\u306e\u306bDateRenderer\u3092\u4f7f\u7528\u3057\u3088\u3046\u3068\u3057\u307e\u3057\u305f\u3002
IngestMessagePanel.moduleErr=\u30E2\u30B8\u30E5\u30FC\u30EB\u30A8\u30E9\u30FC IngestMessagePanel.moduleErr=\u30e2\u30b8\u30e5\u30fc\u30eb\u30a8\u30e9\u30fc
IngestMessagePanel.moduleErr.errListenUpdates.text=IngestMessagePanel\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u3092\u78BA\u8A8D\u4E2D\u306B\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u30A8\u30E9\u30FC\u3092\u8D77\u3053\u3057\u307E\u3057\u305F\u3002\u3069\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u304B\u30ED\u30B0\u3067\u78BA\u8A8D\u3057\u3066\u4E0B\u3055\u3044\u3002\u4E00\u90E8\u306E\u30C7\u30FC\u30BF\u304C\u4E0D\u5B8C\u5168\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u3002 IngestMessagePanel.moduleErr.errListenUpdates.text=IngestMessagePanel\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u78ba\u8a8d\u4e2d\u306b\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u30a8\u30e9\u30fc\u3092\u8d77\u3053\u3057\u307e\u3057\u305f\u3002\u3069\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u304b\u30ed\u30b0\u3067\u78ba\u8a8d\u3057\u3066\u4e0b\u3055\u3044\u3002\u4e00\u90e8\u306e\u30c7\u30fc\u30bf\u304c\u4e0d\u5b8c\u5168\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002
IngestMessagePanel.MsgTableMod.colNames.module=\u30E2\u30B8\u30E5\u30FC\u30EB IngestMessagePanel.MsgTableMod.colNames.module=\u30e2\u30b8\u30e5\u30fc\u30eb
IngestMessagePanel.MsgTableMod.colNames.new=\u65B0\u898F\uFF1F IngestMessagePanel.MsgTableMod.colNames.new=\u65b0\u898f\uff1f
IngestMessagePanel.MsgTableMod.colNames.num=\u756A\u53F7 IngestMessagePanel.MsgTableMod.colNames.num=\u756a\u53f7
IngestMessagePanel.MsgTableMod.colNames.subject=\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8 IngestMessagePanel.MsgTableMod.colNames.subject=\u30b5\u30d6\u30b8\u30a7\u30af\u30c8
IngestMessagePanel.MsgTableMod.colNames.timestamp=\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7 IngestMessagePanel.MsgTableMod.colNames.timestamp=\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7
IngestMessagePanel.sortByComboBox.model.priority=\u512A\u5148\u5EA6 IngestMessagePanel.sortByComboBox.model.priority=\u512a\u5148\u5ea6
IngestMessagePanel.sortByComboBox.model.time=\u6642\u9593 IngestMessagePanel.sortByComboBox.model.time=\u6642\u9593
IngestMessagePanel.sortByComboBox.toolTipText=\u6642\u9593\u9806\uFF08\u6642\u7CFB\u5217\uFF09\u307E\u305F\u306F\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u512A\u5148\u5EA6\u3067\u30BD\u30FC\u30C8 IngestMessagePanel.sortByComboBox.toolTipText=\u6642\u9593\u9806\uff08\u6642\u7cfb\u5217\uff09\u307e\u305f\u306f\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u512a\u5148\u5ea6\u3067\u30bd\u30fc\u30c8
IngestMessagePanel.sortByLabel.text=\u4E0B\u8A18\u3067\u30BD\u30FC\u30C8\uFF1A IngestMessagePanel.sortByLabel.text=\u4e0b\u8a18\u3067\u30bd\u30fc\u30c8\uff1a
IngestMessagePanel.totalMessagesNameLabel.text=\u5408\u8A08\uFF1A IngestMessagePanel.totalMessagesNameLabel.text=\u5408\u8a08\uff1a
IngestMessagePanel.totalMessagesNameVal.text=- IngestMessagePanel.totalMessagesNameVal.text=-
IngestMessagePanel.totalUniqueMessagesNameLabel.text=\u30E6\u30CB\u30FC\u30AF\uFF1A IngestMessagePanel.totalUniqueMessagesNameLabel.text=\u30e6\u30cb\u30fc\u30af\uff1a
IngestMessagePanel.totalUniqueMessagesNameVal.text=- IngestMessagePanel.totalUniqueMessagesNameVal.text=-
IngestMessagesToolbar.customizeButton.toolTipText=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30E1\u30C3\u30BB\u30FC\u30B8 IngestMessagesToolbar.customizeButton.toolTipText=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8
IngestMessageTopComponent.displayName=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30A4\u30F3\u30DC\u30C3\u30AF\u30B9 IngestMessageTopComponent.displayName=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30a4\u30f3\u30dc\u30c3\u30af\u30b9
IngestMessageTopComponent.displayReport.option.GenRpt=\u30EC\u30DD\u30FC\u30C8\u751F\u6210 IngestMessageTopComponent.displayReport.option.GenRpt=\u30ec\u30dd\u30fc\u30c8\u751f\u6210
IngestMessageTopComponent.displayReport.option.OK=OK IngestMessageTopComponent.displayReport.option.OK=OK
IngestMessageTopComponent.initComponents.name=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30A4\u30F3\u30DC\u30C3\u30AF\u30B9 IngestMessageTopComponent.initComponents.name=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30a4\u30f3\u30dc\u30c3\u30af\u30b9
IngestMessageTopComponent.msgDlg.ingestRpt.text=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30EC\u30DD\u30FC\u30C8 IngestMessageTopComponent.msgDlg.ingestRpt.text=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30ec\u30dd\u30fc\u30c8
IngestMonitor.mgrErrMsg.lowDiskSpace.msg=\u30C7\u30A3\u30B9\u30AF{0}\u306E\u30C7\u30A3\u30B9\u30AF\u9818\u57DF\u4E0D\u8DB3\u306E\u305F\u3081\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u3092\u4E2D\u6B62\u3057\u307E\u3059\u3002\ IngestMonitor.mgrErrMsg.lowDiskSpace.msg=\u30c7\u30a3\u30b9\u30af{0}\u306e\u30c7\u30a3\u30b9\u30af\u9818\u57df\u4e0d\u8db3\u306e\u305f\u3081\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u3092\u4e2d\u6b62\u3057\u307e\u3059\u3002\
\u30B1\u30FC\u30B9\u30C9\u30E9\u30A4\u30D6\u306B\u6700\u4F4E1GB\u306E\u7A7A\u304D\u9818\u57DF\u304C\u3042\u308B\u306E\u3092\u78BA\u8A8D\u3057\u3001\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u3092\u518D\u30B9\u30BF\u30FC\u30C8\u3057\u3066\u4E0B\u3055\u3044\u3002 \u30b1\u30fc\u30b9\u30c9\u30e9\u30a4\u30d6\u306b\u6700\u4f4e1GB\u306e\u7a7a\u304d\u9818\u57df\u304c\u3042\u308b\u306e\u3092\u78ba\u8a8d\u3057\u3001\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u3092\u518d\u30b9\u30bf\u30fc\u30c8\u3057\u3066\u4e0b\u3055\u3044\u3002
IngestMonitor.mgrErrMsg.lowDiskSpace.title=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u304C\u4E2D\u6B62\u3055\u308C\u307E\u3057\u305F\u30FC{0}\u306E\u30C7\u30A3\u30B9\u30AF\u9818\u57DF\u4E0D\u8DB3 IngestMonitor.mgrErrMsg.lowDiskSpace.title=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u304c\u4e2d\u6b62\u3055\u308c\u307e\u3057\u305f\u30fc{0}\u306e\u30c7\u30a3\u30b9\u30af\u9818\u57df\u4e0d\u8db3
IngestScheduler.DataSourceScheduler.exception.next.msg=\u30AD\u30E5\u30FC\u306B\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u30BF\u30B9\u30AF\u304C\u3042\u308A\u307E\u305B\u3093\u3001hasNext()\u3092\u78BA\u8A8D\u3057\u3066\u4E0B\u3055\u3044 IngestScheduler.DataSourceScheduler.toString.size=DataSourceQueue, \u30b5\u30a4\u30ba\uff1a
IngestScheduler.DataSourceScheduler.exception.remove.msg=\u30B9\u30B1\u30B8\u30E5\u30FC\u30EB\u3055\u308C\u3066\u3044\u308B\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u306E\u524A\u9664\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
IngestScheduler.DataSourceScheduler.toString.size=DataSourceQueue, \u30B5\u30A4\u30BA\uFF1A
IngestScheduler.FileSched.toString.curDirs.text=\ IngestScheduler.FileSched.toString.curDirs.text=\
CurDirs(stack), \u30B5\u30A4\u30BA\uFF1A CurDirs(stack), \u30b5\u30a4\u30ba\uff1a
IngestScheduler.FileSched.toString.curFiles.text=\ IngestScheduler.FileSched.toString.curFiles.text=\
CurFiles, \u30B5\u30A4\u30BA\uFF1A CurFiles, \u30b5\u30a4\u30ba\uff1a
IngestScheduler.FileSched.toString.rootDirs.text=\ IngestScheduler.FileSched.toString.rootDirs.text=\
RootDirs(sorted), \u30B5\u30A4\u30BA\uFF1A RootDirs(sorted), \u30b5\u30a4\u30ba\uff1a
IngestScheduler.FileTask.next.exception.msg=\u6B21\u306E\u30D7\u30ED\u30EC\u30B9\u30BF\u30B9\u30AF\u306F\u3042\u308A\u307E\u305B\u3093\u3001\u307E\u305AhasNext()\u3092\u78BA\u8A8D\u3057\u3066\u4E0B\u3055\u3044\uFF01 OpenIDE-Module-Name=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8
IngestScheduler.remove.exception.notSupported.msg=\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
OpenIDE-Module-Name=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8

View File

@ -39,7 +39,7 @@ final class IngestJob {
private final boolean processUnallocatedSpace; private final boolean processUnallocatedSpace;
private final HashMap<Long, FileIngestPipeline> fileIngestPipelines = new HashMap<>(); private final HashMap<Long, FileIngestPipeline> fileIngestPipelines = new HashMap<>();
private final HashMap<Long, DataSourceIngestPipeline> dataSourceIngestPipelines = new HashMap<>(); private final HashMap<Long, DataSourceIngestPipeline> dataSourceIngestPipelines = new HashMap<>();
private final IngestScheduler.FileScheduler fileScheduler = IngestScheduler.getInstance().getFileScheduler(); private final IngestScheduler.FileIngestScheduler fileScheduler = IngestScheduler.getInstance().getFileIngestScheduler();
private FileIngestPipeline initialFileIngestPipeline = null; private FileIngestPipeline initialFileIngestPipeline = null;
private DataSourceIngestPipeline initialDataSourceIngestPipeline = null; private DataSourceIngestPipeline initialDataSourceIngestPipeline = null;
private ProgressHandle dataSourceTaskProgress; private ProgressHandle dataSourceTaskProgress;

View File

@ -40,6 +40,7 @@ import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.Content;
import java.util.prefs.Preferences; import java.util.prefs.Preferences;
import javax.swing.SwingWorker; import javax.swing.SwingWorker;
import org.sleuthkit.autopsy.ingest.IngestScheduler.FileIngestScheduler.FileIngestTask;
/** /**
* Manages the execution of ingest jobs. * Manages the execution of ingest jobs.
@ -129,7 +130,7 @@ public class IngestManager {
synchronized void addFileToIngestJob(long ingestJobId, AbstractFile file) { synchronized void addFileToIngestJob(long ingestJobId, AbstractFile file) {
IngestJob job = ingestJobs.get(ingestJobId); IngestJob job = ingestJobs.get(ingestJobId);
if (job != null) { if (job != null) {
scheduler.getFileScheduler().scheduleFile(job, file); scheduler.getFileIngestScheduler().queueFile(job, file);
} }
} }
@ -315,8 +316,8 @@ public class IngestManager {
} }
// Jettision the remaining data source and file ingest tasks. // Jettision the remaining data source and file ingest tasks.
scheduler.getFileScheduler().empty(); scheduler.getFileIngestScheduler().emptyQueues();
scheduler.getDataSourceScheduler().empty(); scheduler.getDataSourceIngestScheduler().emptyQueues();
} }
synchronized void reportStartIngestJobsTaskDone(long taskId) { synchronized void reportStartIngestJobsTaskDone(long taskId) {
@ -411,12 +412,12 @@ public class IngestManager {
// Queue the data source ingest tasks for the ingest job. // Queue the data source ingest tasks for the ingest job.
final String inputName = dataSource.getName(); final String inputName = dataSource.getName();
progress.progress("Data source ingest tasks for " + inputName, workUnitsCompleted); // RJCTODO: Improve progress.progress("Data source ingest tasks for " + inputName, workUnitsCompleted); // RJCTODO: Improve
scheduler.getDataSourceScheduler().schedule(ingestJob); scheduler.getDataSourceIngestScheduler().queueForIngest(ingestJob);
progress.progress("Data source ingest tasks for " + inputName, ++workUnitsCompleted); progress.progress("Data source ingest tasks for " + inputName, ++workUnitsCompleted);
// Queue the file ingest tasks for the ingest job. // Queue the file ingest tasks for the ingest job.
progress.progress("Data source ingest tasks for " + inputName, workUnitsCompleted); progress.progress("Data source ingest tasks for " + inputName, workUnitsCompleted);
scheduler.getFileScheduler().scheduleIngestOfFiles(ingestJob); scheduler.getFileIngestScheduler().queueForIngest(ingestJob);
progress.progress("Data source ingest tasks for " + inputName, ++workUnitsCompleted); progress.progress("Data source ingest tasks for " + inputName, ++workUnitsCompleted);
if (!Thread.currentThread().isInterrupted()) { if (!Thread.currentThread().isInterrupted()) {
@ -447,13 +448,14 @@ public class IngestManager {
@Override @Override
public void run() { public void run() {
try { try {
IngestScheduler.DataSourceScheduler scheduler = IngestScheduler.getInstance().getDataSourceScheduler(); IngestScheduler.DataSourceIngestScheduler scheduler = IngestScheduler.getInstance().getDataSourceIngestScheduler();
while (scheduler.hasNext()) { IngestJob job = scheduler.getNextTask();
while (job != null) {
if (Thread.currentThread().isInterrupted()) { if (Thread.currentThread().isInterrupted()) {
break; break;
} }
IngestJob job = scheduler.next();
job.getDataSourceIngestPipelineForThread(id).process(); job.getDataSourceIngestPipelineForThread(id).process();
job = scheduler.getNextTask();
} }
} catch (Exception ex) { } catch (Exception ex) {
String message = String.format("RunDataSourceIngestModulesTask (id=%d) caught exception", id); String message = String.format("RunDataSourceIngestModulesTask (id=%d) caught exception", id);
@ -475,15 +477,16 @@ public class IngestManager {
@Override @Override
public void run() { public void run() {
try { try {
IngestScheduler.FileScheduler fileScheduler = IngestScheduler.getInstance().getFileScheduler(); IngestScheduler.FileIngestScheduler fileScheduler = IngestScheduler.getInstance().getFileIngestScheduler();
while (fileScheduler.hasNext()) { FileIngestTask task = fileScheduler.getNextTask();
while (task != null) {
if (Thread.currentThread().isInterrupted()) { if (Thread.currentThread().isInterrupted()) {
break; break;
} }
IngestScheduler.FileScheduler.FileTask task = fileScheduler.next();
IngestJob job = task.getJob(); IngestJob job = task.getJob();
job.updateFileTasksProgressBar(task.getFile().getName()); job.updateFileTasksProgressBar(task.getFile().getName());
job.getFileIngestPipelineForThread(id).process(task.getFile()); job.getFileIngestPipelineForThread(id).process(task.getFile());
task = fileScheduler.getNextTask();
} }
} catch (Exception ex) { } catch (Exception ex) {
String message = String.format("RunFileSourceIngestModulesTask (id=%d) caught exception", id); String message = String.format("RunFileSourceIngestModulesTask (id=%d) caught exception", id);

View File

@ -22,9 +22,9 @@ import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.Comparator; import java.util.Comparator;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.Objects;
import java.util.Set; import java.util.Set;
import java.util.TreeSet; import java.util.TreeSet;
import java.util.logging.Level; import java.util.logging.Level;
@ -34,7 +34,7 @@ import java.util.regex.Pattern;
import org.openide.util.NbBundle; import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.ingest.IngestScheduler.FileScheduler.FileTask; import org.sleuthkit.autopsy.ingest.IngestScheduler.FileIngestScheduler.FileIngestTask;
import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.Content;
import org.sleuthkit.datamodel.ContentVisitor; import org.sleuthkit.datamodel.ContentVisitor;
@ -52,29 +52,18 @@ import org.sleuthkit.datamodel.TskData.TSK_DB_FILES_TYPE_ENUM;
import org.sleuthkit.datamodel.TskData.TSK_FS_META_TYPE_ENUM; import org.sleuthkit.datamodel.TskData.TSK_FS_META_TYPE_ENUM;
/** /**
* Schedules data source (images, file-sets, etc) and files with their * Enqueues data source ingest and file ingest tasks for processing.
* associated modules for ingest, and manage queues of the scheduled tasks.
*
* Currently a singleton object only (as there is one pipeline at a time)
*
* Contains internal schedulers for content objects into data source and and
* file ingest pipelines.
*
*/ */
final class IngestScheduler { final class IngestScheduler {
private static IngestScheduler instance; private static IngestScheduler instance;
private static final Logger logger = Logger.getLogger(IngestScheduler.class.getName()); private static final Logger logger = Logger.getLogger(IngestScheduler.class.getName());
private final DataSourceScheduler dataSourceScheduler = new DataSourceScheduler(); private final DataSourceIngestScheduler dataSourceIngestScheduler = new DataSourceIngestScheduler();
private final FileScheduler fileScheduler = new FileScheduler(); private final FileIngestScheduler fileIngestScheduler = new FileIngestScheduler();
private IngestScheduler() { private IngestScheduler() {
} }
/**
* Get ingest scheduler singleton instance
*
* @return
*/
static synchronized IngestScheduler getInstance() { static synchronized IngestScheduler getInstance() {
if (instance == null) { if (instance == null) {
instance = new IngestScheduler(); instance = new IngestScheduler();
@ -83,36 +72,19 @@ final class IngestScheduler {
return instance; return instance;
} }
DataSourceScheduler getDataSourceScheduler() { DataSourceIngestScheduler getDataSourceIngestScheduler() {
return dataSourceScheduler; return dataSourceIngestScheduler;
} }
FileScheduler getFileScheduler() { FileIngestScheduler getFileIngestScheduler() {
return fileScheduler; return fileIngestScheduler;
} }
/** static class FileIngestScheduler {
* FileScheduler ingest scheduler
* private TreeSet<FileIngestTask> rootDirectoryTasks;
* Supports addition ScheduledTasks - tuples of (data-source, modules) private List<FileIngestTask> directoryTasks;
* private LinkedList<FileIngestTask> fileTasks; //need to add to start and end quickly
* Enqueues files and modules, and sorts the files by priority. Maintains
* only top level directories in memory (not all children files of the scheduled container content objects)
*
* getNext() will return next FileTask - tuple of (file, modules)
*
*/
static class FileScheduler implements Iterator<FileScheduler.FileTask> {
//root folders enqueued
private TreeSet<FileTask> rootDirectoryTasks;
//stack of current dirs to be processed recursively
private List<FileTask> directoryTasks;
//list of files being processed in the currently processed directory
private LinkedList<FileTask> fileTasks; //need to add to start and end quickly
//estimated total files to be enqueued for currently scheduled content objects
private int filesEnqueuedEst = 0; private int filesEnqueuedEst = 0;
private int filesDequeued = 0; private int filesDequeued = 0;
private final static int FAT_NTFS_FLAGS = TskData.TSK_FS_TYPE_ENUM.TSK_FS_TYPE_FAT12.getValue() private final static int FAT_NTFS_FLAGS = TskData.TSK_FS_TYPE_ENUM.TSK_FS_TYPE_FAT12.getValue()
@ -120,13 +92,13 @@ final class IngestScheduler {
| TskData.TSK_FS_TYPE_ENUM.TSK_FS_TYPE_FAT32.getValue() | TskData.TSK_FS_TYPE_ENUM.TSK_FS_TYPE_FAT32.getValue()
| TskData.TSK_FS_TYPE_ENUM.TSK_FS_TYPE_NTFS.getValue(); | TskData.TSK_FS_TYPE_ENUM.TSK_FS_TYPE_NTFS.getValue();
private FileScheduler() { private FileIngestScheduler() {
rootDirectoryTasks = new TreeSet<>(new RootTaskComparator()); rootDirectoryTasks = new TreeSet<>(new RootTaskComparator());
directoryTasks = new ArrayList<>(); directoryTasks = new ArrayList<>();
fileTasks = new LinkedList<>(); fileTasks = new LinkedList<>();
resetCounters(); resetCounters();
} }
private void resetCounters() { private void resetCounters() {
filesEnqueuedEst = 0; filesEnqueuedEst = 0;
filesDequeued = 0; filesDequeued = 0;
@ -136,29 +108,28 @@ final class IngestScheduler {
public synchronized String toString() { public synchronized String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append(NbBundle.getMessage(this.getClass(), "IngestScheduler.FileSched.toString.rootDirs.text")).append(rootDirectoryTasks.size()); sb.append(NbBundle.getMessage(this.getClass(), "IngestScheduler.FileSched.toString.rootDirs.text")).append(rootDirectoryTasks.size());
for (FileTask task : rootDirectoryTasks) { for (FileIngestTask task : rootDirectoryTasks) {
sb.append(task.toString()).append(" "); sb.append(task.toString()).append(" ");
} }
sb.append(NbBundle.getMessage(this.getClass(), "IngestScheduler.FileSched.toString.curDirs.text")).append(directoryTasks.size()); sb.append(NbBundle.getMessage(this.getClass(), "IngestScheduler.FileSched.toString.curDirs.text")).append(directoryTasks.size());
for (FileTask task : directoryTasks) { for (FileIngestTask task : directoryTasks) {
sb.append(task.toString()).append(" "); sb.append(task.toString()).append(" ");
} }
sb.append(NbBundle.getMessage(this.getClass(), "IngestScheduler.FileSched.toString.curFiles.text")).append(fileTasks.size()); sb.append(NbBundle.getMessage(this.getClass(), "IngestScheduler.FileSched.toString.curFiles.text")).append(fileTasks.size());
for (FileTask task : fileTasks) { for (FileIngestTask task : fileTasks) {
sb.append(task.toString()).append(" "); sb.append(task.toString()).append(" ");
} }
return sb.toString(); return sb.toString();
} }
synchronized void scheduleIngestOfFiles(IngestJob dataSourceTask) { synchronized void queueForIngest(IngestJob dataSourceTask) {
Content dataSource = dataSourceTask.getDataSource(); Content dataSource = dataSourceTask.getDataSource();
Collection<AbstractFile> rootObjects = dataSource.accept(new GetRootDirVisitor()); Collection<AbstractFile> rootObjects = dataSource.accept(new GetRootDirVisitor());
List<AbstractFile> firstLevelFiles = new ArrayList<>(); List<AbstractFile> firstLevelFiles = new ArrayList<>();
if (rootObjects.isEmpty() && dataSource instanceof AbstractFile) { if (rootObjects.isEmpty() && dataSource instanceof AbstractFile) {
// The data source is file. // The data source is file.
firstLevelFiles.add((AbstractFile)dataSource); firstLevelFiles.add((AbstractFile) dataSource);
} } else {
else {
for (AbstractFile root : rootObjects) { for (AbstractFile root : rootObjects) {
List<Content> children; List<Content> children;
try { try {
@ -166,8 +137,7 @@ final class IngestScheduler {
if (children.isEmpty()) { if (children.isEmpty()) {
//add the root itself, could be unalloc file, child of volume or image //add the root itself, could be unalloc file, child of volume or image
firstLevelFiles.add(root); firstLevelFiles.add(root);
} } else {
else {
//root for fs root dir, schedule children dirs/files //root for fs root dir, schedule children dirs/files
for (Content child : children) { for (Content child : children) {
if (child instanceof AbstractFile) { if (child instanceof AbstractFile) {
@ -175,15 +145,14 @@ final class IngestScheduler {
} }
} }
} }
} } catch (TskCoreException ex) {
catch (TskCoreException ex) {
logger.log(Level.WARNING, "Could not get children of root to enqueue: " + root.getId() + ": " + root.getName(), ex); logger.log(Level.WARNING, "Could not get children of root to enqueue: " + root.getId() + ": " + root.getName(), ex);
} }
} }
} }
for (AbstractFile firstLevelFile : firstLevelFiles) { for (AbstractFile firstLevelFile : firstLevelFiles) {
FileTask fileTask = new FileTask(firstLevelFile, dataSourceTask); FileIngestTask fileTask = new FileIngestTask(firstLevelFile, dataSourceTask);
if (shouldEnqueueTask(fileTask)) { if (shouldEnqueueTask(fileTask)) {
rootDirectoryTasks.add(fileTask); rootDirectoryTasks.add(fileTask);
} }
@ -195,27 +164,15 @@ final class IngestScheduler {
// Reshuffle/update the dir and file level queues if needed // Reshuffle/update the dir and file level queues if needed
updateQueues(); updateQueues();
} }
/** synchronized void queueFile(IngestJob ingestJob, AbstractFile file) {
* Schedule a file to the file ingest, with associated modules. This FileIngestTask fileTask = new FileIngestTask(file, ingestJob);
* will add the file to beginning of the file queue. The method is
* intended for rescheduling a file that is a derivative of another
* content object that has already ingested and produced this file. As a
* result, the derivative file will be scheduled with the same priority
* as the parent origin file.
*
* @param file file to be scheduled
* @param originalContext original content schedule context that was used
* to schedule the parent origin content, with the modules, settings, etc.
*/
synchronized void scheduleFile(IngestJob ingestJob, AbstractFile file) {
FileTask fileTask = new FileTask(file, ingestJob);
if (shouldEnqueueTask(fileTask)) { if (shouldEnqueueTask(fileTask)) {
fileTasks.addFirst(fileTask); fileTasks.addFirst(fileTask);
++filesEnqueuedEst; ++filesEnqueuedEst;
} }
} }
float getPercentageDone() { float getPercentageDone() {
if (filesEnqueuedEst == 0) { if (filesEnqueuedEst == 0) {
return 0; return 0;
@ -240,7 +197,7 @@ final class IngestScheduler {
totalFiles += content.accept(countVisitor); totalFiles += content.accept(countVisitor);
} }
logger.log(Level.INFO, "Total files to queue up: " + totalFiles); logger.log(Level.INFO, "Total files to queue up: {0}", totalFiles);
return totalFiles; return totalFiles;
} }
@ -264,38 +221,23 @@ final class IngestScheduler {
int getFilesDequeued() { int getFilesDequeued() {
return filesDequeued; return filesDequeued;
} }
@Override
public synchronized boolean hasNext() {
if (fileTasks.isEmpty()) {
filesEnqueuedEst = 0;
filesDequeued = 0;
return false;
}
return true;
}
@Override synchronized FileIngestTask getNextTask() {
public synchronized FileTask next() { final FileIngestTask task = fileTasks.pollLast();
if (!hasNext()) { if (task != null) {
throw new IllegalStateException( filesDequeued++;
NbBundle.getMessage(this.getClass(), "IngestScheduler.FileTask.next.exception.msg")); updateQueues();
} }
//dequeue the last in the list
final FileTask task = fileTasks.pollLast();
filesDequeued++;
updateQueues();
return task; return task;
} }
/** /**
* Shuffle the queues so that there are files in the files queue. * Shuffle the queues so that there are files in the files queue.
*
* @returns true if no more data in queue * @returns true if no more data in queue
*/ */
private synchronized void updateQueues() { private synchronized void updateQueues() {
// we loop because we could have a directory that has all files // we loop because we could have a directory that has all files
// that do not get enqueued // that do not get enqueued
while (true) { while (true) {
@ -303,20 +245,20 @@ final class IngestScheduler {
if (this.fileTasks.isEmpty() == false) { if (this.fileTasks.isEmpty() == false) {
return; return;
} }
// fill in the directory queue if it is empty. // fill in the directory queue if it is empty.
if (this.directoryTasks.isEmpty()) { if (this.directoryTasks.isEmpty()) {
// bail out if root is also empty -- we are done // bail out if root is also empty -- we are done
if (rootDirectoryTasks.isEmpty()) { if (rootDirectoryTasks.isEmpty()) {
return; return;
} }
FileTask rootTask = this.rootDirectoryTasks.pollFirst(); FileIngestTask rootTask = this.rootDirectoryTasks.pollFirst();
directoryTasks.add(rootTask); directoryTasks.add(rootTask);
} }
//pop and push AbstractFile directory children if any //pop and push AbstractFile directory children if any
//add the popped and its leaf children onto cur file list //add the popped and its leaf children onto cur file list
FileTask parentTask = directoryTasks.remove(directoryTasks.size() - 1); FileIngestTask parentTask = directoryTasks.remove(directoryTasks.size() - 1);
final AbstractFile parentFile = parentTask.file; final AbstractFile parentFile = parentTask.file;
// add itself to the file list // add itself to the file list
@ -330,12 +272,11 @@ final class IngestScheduler {
for (Content c : children) { for (Content c : children) {
if (c instanceof AbstractFile) { if (c instanceof AbstractFile) {
AbstractFile childFile = (AbstractFile) c; AbstractFile childFile = (AbstractFile) c;
FileTask childTask = new FileTask(childFile, parentTask.getJob()); FileIngestTask childTask = new FileIngestTask(childFile, parentTask.getJob());
if (childFile.hasChildren()) { if (childFile.hasChildren()) {
this.directoryTasks.add(childTask); this.directoryTasks.add(childTask);
} } else if (shouldEnqueueTask(childTask)) {
else if (shouldEnqueueTask(childTask)) {
this.fileTasks.addLast(childTask); this.fileTasks.addLast(childTask);
} }
} }
@ -347,14 +288,8 @@ final class IngestScheduler {
} }
} }
@Override
public void remove() {
throw new UnsupportedOperationException(
NbBundle.getMessage(this.getClass(), "IngestScheduler.remove.exception.notSupported.msg"));
}
/** /**
* Return list of content objects that are in the queue to be processed. * Return list of content objects that are in the queue to be processed.
* *
* Helpful to determine whether ingest for particular input Content is * Helpful to determine whether ingest for particular input Content is
* active * active
@ -365,20 +300,20 @@ final class IngestScheduler {
synchronized List<Content> getSourceContent() { synchronized List<Content> getSourceContent() {
final Set<Content> contentSet = new HashSet<>(); final Set<Content> contentSet = new HashSet<>();
for (FileTask task : rootDirectoryTasks) { for (FileIngestTask task : rootDirectoryTasks) {
contentSet.add(task.getJob().getDataSource()); contentSet.add(task.getJob().getDataSource());
} }
for (FileTask task : directoryTasks) { for (FileIngestTask task : directoryTasks) {
contentSet.add(task.getJob().getDataSource()); contentSet.add(task.getJob().getDataSource());
} }
for (FileTask task : fileTasks) { for (FileIngestTask task : fileTasks) {
contentSet.add(task.getJob().getDataSource()); contentSet.add(task.getJob().getDataSource());
} }
return new ArrayList<>(contentSet); return new ArrayList<>(contentSet);
} }
synchronized void empty() { synchronized void emptyQueues() {
this.rootDirectoryTasks.clear(); this.rootDirectoryTasks.clear();
this.directoryTasks.clear(); this.directoryTasks.clear();
this.fileTasks.clear(); this.fileTasks.clear();
@ -391,7 +326,7 @@ final class IngestScheduler {
* skipped * skipped
* @return true if should be enqueued, false otherwise * @return true if should be enqueued, false otherwise
*/ */
private static boolean shouldEnqueueTask(final FileTask processTask) { private static boolean shouldEnqueueTask(final FileIngestTask processTask) {
final AbstractFile aFile = processTask.file; final AbstractFile aFile = processTask.file;
//if it's unalloc file, skip if so scheduled //if it's unalloc file, skip if so scheduled
@ -449,23 +384,20 @@ final class IngestScheduler {
return true; return true;
} }
/** static class FileIngestTask {
* Task for a specific file to process. More specific than the
* higher-level DataSourceTask.
*/
static class FileTask {
private final AbstractFile file; private final AbstractFile file;
private final IngestJob task; private final IngestJob task;
public FileTask(AbstractFile file, IngestJob task) { private FileIngestTask(AbstractFile file, IngestJob task) {
this.file = file; this.file = file;
this.task = task; this.task = task;
} }
public IngestJob getJob() { public IngestJob getJob() {
return task; return task;
} }
public AbstractFile getFile() { public AbstractFile getFile() {
return file; return file;
} }
@ -498,7 +430,7 @@ final class IngestScheduler {
if (getClass() != obj.getClass()) { if (getClass() != obj.getClass()) {
return false; return false;
} }
final FileTask other = (FileTask) obj; final FileIngestTask other = (FileIngestTask) obj;
if (this.file != other.file && (this.file == null || !this.file.equals(other.file))) { if (this.file != other.file && (this.file == null || !this.file.equals(other.file))) {
return false; return false;
} }
@ -511,17 +443,25 @@ final class IngestScheduler {
} }
return true; return true;
} }
}
@Override
public int hashCode() {
int hash = 5;
hash = 47 * hash + Objects.hashCode(this.file);
hash = 47 * hash + Objects.hashCode(this.task);
return hash;
}
}
/** /**
* Root dir sorter * Root dir sorter
*/ */
private static class RootTaskComparator implements Comparator<FileTask> { private static class RootTaskComparator implements Comparator<FileIngestTask> {
@Override @Override
public int compare(FileTask q1, FileTask q2) { public int compare(FileIngestTask q1, FileIngestTask q2) {
AbstractFilePriotity.Priority p1 = AbstractFilePriotity.getPriority(q1.file); AbstractFilePriority.Priority p1 = AbstractFilePriority.getPriority(q1.file);
AbstractFilePriotity.Priority p2 = AbstractFilePriotity.getPriority(q2.file); AbstractFilePriority.Priority p2 = AbstractFilePriority.getPriority(q2.file);
if (p1 == p2) { if (p1 == p2) {
return (int) (q2.file.getId() - q1.file.getId()); return (int) (q2.file.getId() - q1.file.getId());
} else { } else {
@ -534,16 +474,16 @@ final class IngestScheduler {
* Priority determination for sorted AbstractFile, used by * Priority determination for sorted AbstractFile, used by
* RootDirComparator * RootDirComparator
*/ */
private static class AbstractFilePriotity { private static class AbstractFilePriority {
enum Priority { enum Priority {
LAST, LOW, MEDIUM, HIGH LAST, LOW, MEDIUM, HIGH
}; };
static final List<Pattern> LAST_PRI_PATHS = new ArrayList<Pattern>(); static final List<Pattern> LAST_PRI_PATHS = new ArrayList<>();
static final List<Pattern> LOW_PRI_PATHS = new ArrayList<Pattern>(); static final List<Pattern> LOW_PRI_PATHS = new ArrayList<>();
static final List<Pattern> MEDIUM_PRI_PATHS = new ArrayList<Pattern>(); static final List<Pattern> MEDIUM_PRI_PATHS = new ArrayList<>();
static final List<Pattern> HIGH_PRI_PATHS = new ArrayList<Pattern>(); static final List<Pattern> HIGH_PRI_PATHS = new ArrayList<>();
/* prioritize root directory folders based on the assumption that we are /* prioritize root directory folders based on the assumption that we are
* looking for user content. Other types of investigations may want different * looking for user content. Other types of investigations may want different
@ -572,54 +512,55 @@ final class IngestScheduler {
} }
/** /**
* Get the scheduling priority for a given file. * Get the scheduling priority for a given file.
*
* @param abstractFile * @param abstractFile
* @return * @return
*/ */
static AbstractFilePriotity.Priority getPriority(final AbstractFile abstractFile) { static AbstractFilePriority.Priority getPriority(final AbstractFile abstractFile) {
if (!abstractFile.getType().equals(TskData.TSK_DB_FILES_TYPE_ENUM.FS)) { if (!abstractFile.getType().equals(TskData.TSK_DB_FILES_TYPE_ENUM.FS)) {
//quickly filter out unstructured content //quickly filter out unstructured content
//non-fs virtual files and dirs, such as representing unalloc space //non-fs virtual files and dirs, such as representing unalloc space
return AbstractFilePriotity.Priority.LAST; return AbstractFilePriority.Priority.LAST;
} }
//determine the fs files priority by name //determine the fs files priority by name
final String path = abstractFile.getName(); final String path = abstractFile.getName();
if (path == null) { if (path == null) {
return AbstractFilePriotity.Priority.MEDIUM; return AbstractFilePriority.Priority.MEDIUM;
} }
for (Pattern p : HIGH_PRI_PATHS) { for (Pattern p : HIGH_PRI_PATHS) {
Matcher m = p.matcher(path); Matcher m = p.matcher(path);
if (m.find()) { if (m.find()) {
return AbstractFilePriotity.Priority.HIGH; return AbstractFilePriority.Priority.HIGH;
} }
} }
for (Pattern p : MEDIUM_PRI_PATHS) { for (Pattern p : MEDIUM_PRI_PATHS) {
Matcher m = p.matcher(path); Matcher m = p.matcher(path);
if (m.find()) { if (m.find()) {
return AbstractFilePriotity.Priority.MEDIUM; return AbstractFilePriority.Priority.MEDIUM;
} }
} }
for (Pattern p : LOW_PRI_PATHS) { for (Pattern p : LOW_PRI_PATHS) {
Matcher m = p.matcher(path); Matcher m = p.matcher(path);
if (m.find()) { if (m.find()) {
return AbstractFilePriotity.Priority.LOW; return AbstractFilePriority.Priority.LOW;
} }
} }
for (Pattern p : LAST_PRI_PATHS) { for (Pattern p : LAST_PRI_PATHS) {
Matcher m = p.matcher(path); Matcher m = p.matcher(path);
if (m.find()) { if (m.find()) {
return AbstractFilePriotity.Priority.LAST; return AbstractFilePriority.Priority.LAST;
} }
} }
//default is medium //default is medium
return AbstractFilePriotity.Priority.MEDIUM; return AbstractFilePriority.Priority.MEDIUM;
} }
} }
} }
@ -627,8 +568,8 @@ final class IngestScheduler {
/** /**
* Get counts of ingestable files/dirs for the content input source. * Get counts of ingestable files/dirs for the content input source.
* *
* Note, also includes counts of all unalloc children files (for the fs, image, volume) even * Note, also includes counts of all unalloc children files (for the fs,
* if ingest didn't ask for them * image, volume) even if ingest didn't ask for them
*/ */
static class GetFilesCountVisitor extends ContentVisitor.Default<Long> { static class GetFilesCountVisitor extends ContentVisitor.Default<Long> {
@ -653,7 +594,7 @@ final class IngestScheduler {
//queryB.append(")"); //queryB.append(")");
try { try {
final String query = queryB.toString(); final String query = queryB.toString();
logger.log(Level.INFO, "Executing count files query: " + query); logger.log(Level.INFO, "Executing count files query: {0}", query);
return sc.countFilesWhere(query); return sc.countFilesWhere(query);
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Couldn't get count of all files in FileSystem", ex); logger.log(Level.SEVERE, "Couldn't get count of all files in FileSystem", ex);
@ -704,7 +645,7 @@ final class IngestScheduler {
public Collection<AbstractFile> visit(VirtualDirectory ld) { public Collection<AbstractFile> visit(VirtualDirectory ld) {
//case when we hit a layout directoryor local file container, not under a real FS //case when we hit a layout directoryor local file container, not under a real FS
//or when root virt dir is scheduled //or when root virt dir is scheduled
Collection<AbstractFile> ret = new ArrayList<AbstractFile>(); Collection<AbstractFile> ret = new ArrayList<>();
ret.add(ld); ret.add(ld);
return ret; return ret;
} }
@ -712,7 +653,7 @@ final class IngestScheduler {
@Override @Override
public Collection<AbstractFile> visit(LayoutFile lf) { public Collection<AbstractFile> visit(LayoutFile lf) {
//case when we hit a layout file, not under a real FS //case when we hit a layout file, not under a real FS
Collection<AbstractFile> ret = new ArrayList<AbstractFile>(); Collection<AbstractFile> ret = new ArrayList<>();
ret.add(lf); ret.add(lf);
return ret; return ret;
} }
@ -721,7 +662,7 @@ final class IngestScheduler {
public Collection<AbstractFile> visit(Directory drctr) { public Collection<AbstractFile> visit(Directory drctr) {
//we hit a real directory, a child of real FS //we hit a real directory, a child of real FS
Collection<AbstractFile> ret = new ArrayList<AbstractFile>(); Collection<AbstractFile> ret = new ArrayList<>();
ret.add(drctr); ret.add(drctr);
@ -756,68 +697,32 @@ final class IngestScheduler {
} }
} }
/** static class DataSourceIngestScheduler {
* DataSourceScheduler ingest scheduler
*/
static class DataSourceScheduler implements Iterator<IngestJob> {
private LinkedList<IngestJob> tasks; private final LinkedList<IngestJob> tasks = new LinkedList<>();
DataSourceScheduler() { private DataSourceIngestScheduler() {
tasks = new LinkedList<>();
} }
synchronized void schedule(IngestJob task) { synchronized void queueForIngest(IngestJob job) {
try { try {
if (task.getDataSource().getParent() != null) { if (job.getDataSource().getParent() != null) {
//only accepting parent-less content objects (Image, parentless VirtualDirectory) logger.log(Level.SEVERE, "Only parent-less Content (data sources) can be scheduled for DataSource ingest, skipping: {0}", job.getDataSource());
logger.log(Level.SEVERE, "Only parent-less Content (data sources) can be scheduled for DataSource ingest, skipping: {0}", task.getDataSource());
return; return;
} }
} catch (TskCoreException e) { } catch (TskCoreException e) {
logger.log(Level.SEVERE, "Error validating data source to be scheduled for DataSource ingest" + task.getDataSource(), e); logger.log(Level.SEVERE, "Error validating data source to be scheduled for DataSource ingest" + job.getDataSource(), e);
return; return;
} }
tasks.addLast(task); tasks.addLast(job);
} }
@Override public synchronized IngestJob getNextTask() {
public synchronized IngestJob next() throws IllegalStateException { return tasks.pollFirst();
if (!hasNext()) {
throw new IllegalStateException(
NbBundle.getMessage(this.getClass(), "IngestScheduler.DataSourceScheduler.exception.next.msg"));
}
final IngestJob ret = tasks.pollFirst();
return ret;
} }
/** synchronized void emptyQueues() {
* get all data source that are scheduled to process
*
* @return list of data sources in the queue scheduled to process
*/
synchronized List<org.sleuthkit.datamodel.Content> getContents() {
List<org.sleuthkit.datamodel.Content> contents = new ArrayList<org.sleuthkit.datamodel.Content>();
for (IngestJob task : tasks) {
contents.add(task.getDataSource());
}
return contents;
}
@Override
public synchronized boolean hasNext() {
return !tasks.isEmpty();
}
@Override
public void remove() {
throw new UnsupportedOperationException(
NbBundle.getMessage(this.getClass(), "IngestScheduler.DataSourceScheduler.exception.remove.msg"));
}
synchronized void empty() {
tasks.clear(); tasks.clear();
} }