Class JDBCPipesIterator
java.lang.Object
org.apache.tika.plugins.AbstractTikaExtension
org.apache.tika.pipes.pipesiterator.PipesIteratorBase
org.apache.tika.pipes.iterator.jdbc.JDBCPipesIterator
- All Implemented Interfaces:
Iterable<FetchEmitTuple>,Callable<Integer>,PipesIterator,TikaExtension
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.PipesIteratorBase
DEFAULT_MAX_WAIT_MS, DEFAULT_QUEUE_SIZEFields inherited from class org.apache.tika.plugins.AbstractTikaExtension
pluginConfigFields inherited from interface org.apache.tika.pipes.api.pipesiterator.PipesIterator
COMPLETED_SEMAPHORE -
Method Summary
Modifier and TypeMethodDescriptionstatic JDBCPipesIteratorbuild(ExtensionConfig extensionConfig) protected voidenqueue()Methods inherited from class org.apache.tika.pipes.pipesiterator.PipesIteratorBase
call, iterator, tryToAddMethods inherited from class org.apache.tika.plugins.AbstractTikaExtension
getExtensionConfigMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.apache.tika.plugins.TikaExtension
getExtensionConfig
-
Method Details
-
build
public static JDBCPipesIterator build(ExtensionConfig extensionConfig) throws IOException, TikaConfigException - Throws:
IOExceptionTikaConfigException
-
enqueue
- Specified by:
enqueuein classPipesIteratorBase- Throws:
InterruptedExceptionIOExceptionTimeoutException
-