Class JDBCPipesReporter
- java.lang.Object
- 
- org.apache.tika.pipes.PipesReporter
- 
- org.apache.tika.pipes.PipesReporterBase
- 
- org.apache.tika.pipes.reporters.jdbc.JDBCPipesReporter
 
 
 
- 
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- Initializable
 
 public class JDBCPipesReporter extends PipesReporterBase implements Initializable This is an initial draft of a JDBCPipesReporter. This will drop the tika_status table with each run. If you'd like different behavior, please open a ticket on our JIRA!
- 
- 
Field SummaryFields Modifier and Type Field Description static StringTABLE_NAME- 
Fields inherited from class org.apache.tika.pipes.PipesReporterNO_OP_REPORTER
 
- 
 - 
Constructor SummaryConstructors Constructor Description JDBCPipesReporter()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckInitialization(InitializableProblemHandler problemHandler)voidclose()No-op implementation.voiderror(String msg)This is called if the process has crashed.voiderror(Throwable t)This is called if the process has crashed.voidinitialize(Map<String,Param> params)voidreport(FetchEmitTuple t, PipesResult result, long elapsed)voidsetCacheSize(int cacheSize)Commit the reports if the cache is greater than or equal to this size.voidsetConnection(String connection)voidsetPostConnection(String postConnection)This sql will be called immediately after the connection is made.voidsetReportWithinMs(long reportWithinMs)Commit the reports if the amount of time elapsed since the last report commit exceeds this value.- 
Methods inherited from class org.apache.tika.pipes.PipesReporterBaseaccept, setExcludes, setIncludes
 - 
Methods inherited from class org.apache.tika.pipes.PipesReporterreport, supportsTotalCount
 
- 
 
- 
- 
- 
Field Detail- 
TABLE_NAMEpublic static final String TABLE_NAME - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
initializepublic void initialize(Map<String,Param> params) throws TikaConfigException - Specified by:
- initializein interface- Initializable
- Overrides:
- initializein class- PipesReporterBase
- Parameters:
- params- params to use for initialization
- Throws:
- TikaConfigException
 
 - 
checkInitializationpublic void checkInitialization(InitializableProblemHandler problemHandler) throws TikaConfigException - Specified by:
- checkInitializationin interface- Initializable
- Overrides:
- checkInitializationin class- PipesReporterBase
- Parameters:
- problemHandler- if there is a problem and no custom initializableProblemHandler has been configured via Initializable parameters, this is called to respond.
- Throws:
- TikaConfigException
 
 - 
setCacheSize@Field public void setCacheSize(int cacheSize) Commit the reports if the cache is greater than or equal to this size. Default isDEFAULT_CACHE_SIZE. The reports will be committed if the cache size triggers reporting or if the amount of time since last reported (reportWithinMs) triggers reporting.- Parameters:
- cacheSize-
 
 - 
setReportWithinMs@Field public void setReportWithinMs(long reportWithinMs) Commit the reports if the amount of time elapsed since the last report commit exceeds this value. Default isDEFAULT_REPORT_WITHIN_MS. The reports will be committed if the cache size triggers reporting or if the amount of time since last reported triggers reporting.- Parameters:
- reportWithinMs-
 
 - 
setPostConnection@Field public void setPostConnection(String postConnection) This sql will be called immediately after the connection is made. This was initially added for setting pragmas on sqlite3, but may be used for other connection configuration in other dbs. Note: This is called before the table is created if it needs to be created.- Parameters:
- postConnection-
 
 - 
reportpublic void report(FetchEmitTuple t, PipesResult result, long elapsed) - Specified by:
- reportin class- PipesReporter
 
 - 
errorpublic void error(Throwable t) Description copied from class:PipesReporterThis is called if the process has crashed. Implementers should not rely on close() to be called after this.- Specified by:
- errorin class- PipesReporter
 
 - 
errorpublic void error(String msg) Description copied from class:PipesReporterThis is called if the process has crashed. Implementers should not rely on close() to be called after this.- Specified by:
- errorin class- PipesReporter
 
 - 
closepublic void close() throws IOExceptionDescription copied from class:PipesReporterNo-op implementation. Override for custom behavior- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- PipesReporter
- Throws:
- IOException
 
 
- 
 
-