Class JDBCPipesIterator
java.lang.Object
org.apache.tika.config.ConfigBase
org.apache.tika.pipes.pipesiterator.PipesIterator
org.apache.tika.pipes.pipesiterator.jdbc.JDBCPipesIterator
- All Implemented Interfaces:
Iterable<FetchEmitTuple>
,Callable<Integer>
,Initializable
Iterates through a the results from a sql call via jdbc. This adds all columns
(except for the 'fetchKeyColumn' and 'emitKeyColumn', if specified)
to the metadata object.
- If a 'fetchKeyColumn' is specified, this will use that column's value as the fetchKey.
- If no 'fetchKeyColumn' is specified, this will send the metadata from the other columns.
- The 'fetchKeyColumn' value is not added to the metadata.
- An 'emitKeyColumn' must be specified
- The 'emitKeyColumn' value is not added to the metadata.
-
Field Summary
Fields inherited from class org.apache.tika.pipes.pipesiterator.PipesIterator
COMPLETED_SEMAPHORE, DEFAULT_MAX_WAIT_MS, DEFAULT_QUEUE_SIZE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkInitialization
(InitializableProblemHandler problemHandler) protected void
enqueue()
void
initialize
(Map<String, Param> params) void
setConnection
(String connection) void
setEmitKeyColumn
(String fetchKeyColumn) void
setFetchKeyColumn
(String fetchKeyColumn) void
setFetchKeyRangeEndColumn
(String fetchKeyRangeEndColumn) void
setFetchKeyRangeStartColumn
(String fetchKeyRangeStartColumn) void
setFetchSize
(int fetchSize) void
setIdColumn
(String idColumn) void
setQueryTimeoutSeconds
(int seconds) void
Methods inherited from class org.apache.tika.pipes.pipesiterator.PipesIterator
build, call, getEmitterName, getFetcherName, getHandlerConfig, getOnParseException, iterator, setEmitterName, setFetcherName, setHandlerType, setMaxEmbeddedResources, setMaxWaitMs, setOnParseException, setOnParseException, setParseMode, setParseMode, setQueueSize, setWriteLimit, tryToAdd
Methods inherited from class org.apache.tika.config.ConfigBase
buildComposite, buildComposite, buildSingle, buildSingle, configure, handleSettings
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
JDBCPipesIterator
public JDBCPipesIterator()
-
-
Method Details
-
setIdColumn
-
setFetchKeyColumn
-
setFetchKeyRangeStartColumn
-
setFetchKeyRangeEndColumn
-
setEmitKeyColumn
-
setConnection
-
getSelect
-
setSelect
-
setFetchSize
- Throws:
TikaConfigException
-
setQueryTimeoutSeconds
public void setQueryTimeoutSeconds(int seconds) -
enqueue
- Specified by:
enqueue
in classPipesIterator
- Throws:
InterruptedException
IOException
TimeoutException
-
initialize
- Specified by:
initialize
in interfaceInitializable
- Overrides:
initialize
in classPipesIterator
- Parameters:
params
- params to use for initialization- Throws:
TikaConfigException
-
checkInitialization
public void checkInitialization(InitializableProblemHandler problemHandler) throws TikaConfigException - Specified by:
checkInitialization
in interfaceInitializable
- Overrides:
checkInitialization
in classPipesIterator
- Parameters:
problemHandler
- if there is a problem and no custom initializableProblemHandler has been configured via Initializable parameters, this is called to respond.- Throws:
TikaConfigException
-