Package org.apache.tika.eval.app
Class RunInfo
java.lang.Object
org.apache.tika.eval.app.RunInfo
Provenance for an eval run: what tika-eval this is, what it was pointed at, and (via
--runInfo) what batch run produced the extracts. Lands in run_info
(run_info_a/run_info_b for the two sides of a comparison) as key/value rows.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOne side's batch inputs: the ledger (may be null) and the flattened run-info (may be empty). -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckRunId(Map<String, String> batch, Path pipesReport) A pipes report produced by a different batch run than the run-info describes is the failure mode nobody can see after the fact; refuse it.static PathdiscoverPipesReport(Path extracts) static PathdiscoverRunInfo(Path extracts) The batch script leaves its files in<extracts>/.run-info/.evalInfo(String[] args, EvalConfig config, Path inputDir) extractsInfo(Path extracts) Count and a sha256 over the sorted "relpath size" lines of the extract set.static voidRecords the end time and the join outcome of each ledger, then flushes.static booleanisRunInfoPath(String relativePath) Flattens the batch script's run-info json into dotted keys underbatch..static RunInfo.SideResolves and loads one side's ledger and run-info: an explicit path wins, otherwise<extracts>/.run-info/is searched, and the pair is refused if it is from two runs.pipesReportInfo(PipesReport report) static void
-
Field Details
-
RUN_INFO_TABLE
-
RUN_INFO_TABLE_A
-
RUN_INFO_TABLE_B
-
BATCH_PREFIX
- See Also:
-
RUN_ID_KEY
- See Also:
-
PIPES_REPORT_PATH_KEY
- See Also:
-
RUN_INFO_DIR
Written by run-batch.sh inside the extracts dir; skipped by the crawl and the fingerprint.- See Also:
-
-
Method Details
-
loadSide
public static RunInfo.Side loadSide(Path explicitPipesReport, Path explicitRunInfo, Path extracts) throws IOException Resolves and loads one side's ledger and run-info: an explicit path wins, otherwise<extracts>/.run-info/is searched, and the pair is refused if it is from two runs.- Throws:
IOException
-
discoverRunInfo
The batch script leaves its files in<extracts>/.run-info/. Used when the CLI flags are absent; exactly one run-info there is required, since two means the extracts were written by two runs.- Returns:
- run-info json path or null if the dir has none
- Throws:
IOException
-
discoverPipesReport
- Throws:
IOException
-
isRunInfoPath
-
loadBatch
Flattens the batch script's run-info json into dotted keys underbatch..- Throws:
IOException
-
checkRunId
A pipes report produced by a different batch run than the run-info describes is the failure mode nobody can see after the fact; refuse it. The script names the ledgercrashes-<run.id>.jsonl; a run-info with a blankrun.idcannot vouch for any ledger. -
pipesReportInfo
-
extractsInfo
Count and a sha256 over the sorted "relpath size" lines of the extract set.- Throws:
IllegalArgumentException- ifextractsis not a directoryIOException
-
evalInfo
-
write
public static void write(IDBWriter writer, TableInfo table, Map<String, String> info) throws IOException- Throws:
IOException
-
finish
public static void finish(IDBWriter writer, TableInfo evalTable, Map<TableInfo, PipesReport> reportsByTable) Records the end time and the join outcome of each ledger, then flushes. Never throws: this runs in the runners'finally, where an exception would mask the real failure and skip the executor/connection shutdown after it.
-