Class FileSystemStatusReporter
java.lang.Object
org.apache.tika.plugins.AbstractTikaExtension
org.apache.tika.pipes.reporter.fs.FileSystemStatusReporter
- All Implemented Interfaces:
Closeable,AutoCloseable,PipesReporter,TikaExtension
This is intended to write summary statistics to disk
periodically.
As of the 2.5.0 release, this is ALPHA version. There may be breaking changes
in the future.
Because
uses {@link java.time.Instant}, if you are deserializing
with jackson-databind, you'll need to add jackson-datatype-jsr310. See
the unit tests for how to deserialize AsyncStatus.-
Field Summary
Fields inherited from class org.apache.tika.plugins.AbstractTikaExtension
pluginConfig -
Method Summary
Modifier and TypeMethodDescriptionstatic FileSystemStatusReporterbuild(ExtensionConfig pluginConfig) voidclose()voidThis is called if the process has crashed.voidThis is called if the process has crashed.voidreport(FetchEmitTuple t, PipesResult result, long elapsed) voidreport(TotalCountResult totalCountResult) Make sure to overridePipesReporter.supportsTotalCount()to returntruebooleanOverride this if your reporter supports total count.
-
Method Details
-
build
public static FileSystemStatusReporter build(ExtensionConfig pluginConfig) throws TikaConfigException, IOException - Throws:
TikaConfigExceptionIOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
error
Description copied from interface:PipesReporterThis is called if the process has crashed. Implementers should not rely on close() to be called after this.- Specified by:
errorin interfacePipesReporter
-
error
Description copied from interface:PipesReporterThis is called if the process has crashed. Implementers should not rely on close() to be called after this.- Specified by:
errorin interfacePipesReporter
-
report
- Specified by:
reportin interfacePipesReporter
-
report
Description copied from interface:PipesReporterMake sure to overridePipesReporter.supportsTotalCount()to returntrue- Specified by:
reportin interfacePipesReporter
-
supportsTotalCount
public boolean supportsTotalCount()Description copied from interface:PipesReporterOverride this if your reporter supports total count.- Specified by:
supportsTotalCountin interfacePipesReporter- Returns:
falseas the baseline implementation
-
getExtensionConfig
- Specified by:
getExtensionConfigin interfaceTikaExtension- Overrides:
getExtensionConfigin classAbstractTikaExtension
-