Class FileSystemStatusReporter
java.lang.Object
org.apache.tika.pipes.PipesReporter
org.apache.tika.pipes.reporters.fs.FileSystemStatusReporter
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Initializable
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.pipes.PipesReporter
NO_OP_REPORTER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkInitialization
(InitializableProblemHandler problemHandler) void
close()
No-op implementation.void
This is called if the process has crashed.void
This is called if the process has crashed.void
initialize
(Map<String, Param> params) void
report
(FetchEmitTuple t, PipesResult result, long elapsed) void
report
(TotalCountResult totalCountResult) No-op implementation.void
setReportUpdateMillis
(long millis) void
setStatusFile
(String path) boolean
Override this if your reporter supports total count.
-
Constructor Details
-
FileSystemStatusReporter
public FileSystemStatusReporter()
-
-
Method Details
-
setStatusFile
-
setReportUpdateMillis
-
initialize
- Specified by:
initialize
in interfaceInitializable
- Parameters:
params
- params to use for initialization- Throws:
TikaConfigException
-
checkInitialization
public void checkInitialization(InitializableProblemHandler problemHandler) throws TikaConfigException - Specified by:
checkInitialization
in interfaceInitializable
- Parameters:
problemHandler
- if there is a problem and no custom initializableProblemHandler has been configured via Initializable parameters, this is called to respond.- Throws:
TikaConfigException
-
close
Description copied from class:PipesReporter
No-op implementation. Override for custom behavior- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classPipesReporter
- Throws:
IOException
-
error
Description copied from class:PipesReporter
This is called if the process has crashed. Implementers should not rely on close() to be called after this.- Specified by:
error
in classPipesReporter
-
error
Description copied from class:PipesReporter
This is called if the process has crashed. Implementers should not rely on close() to be called after this.- Specified by:
error
in classPipesReporter
-
report
- Specified by:
report
in classPipesReporter
-
report
Description copied from class:PipesReporter
No-op implementation. Override for custom behavior and make sure to overridePipesReporter.supportsTotalCount()
to returntrue
- Overrides:
report
in classPipesReporter
-
supportsTotalCount
public boolean supportsTotalCount()Description copied from class:PipesReporter
Override this if your reporter supports total count.- Overrides:
supportsTotalCount
in classPipesReporter
- Returns:
false
as the baseline implementation
-