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
 
 public class JDBCPipesIterator extends PipesIterator implements 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.PipesIteratorCOMPLETED_SEMAPHORE, DEFAULT_MAX_WAIT_MS, DEFAULT_QUEUE_SIZE
 
- 
 - 
Constructor SummaryConstructors Constructor Description JDBCPipesIterator()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckInitialization(InitializableProblemHandler problemHandler)protected voidenqueue()StringgetSelect()voidinitialize(Map<String,Param> params)voidsetConnection(String connection)voidsetEmitKeyColumn(String fetchKeyColumn)voidsetFetchKeyColumn(String fetchKeyColumn)voidsetFetchKeyRangeEndColumn(String fetchKeyRangeEndColumn)voidsetFetchKeyRangeStartColumn(String fetchKeyRangeStartColumn)voidsetFetchSize(int fetchSize)voidsetIdColumn(String idColumn)voidsetQueryTimeoutSeconds(int seconds)voidsetSelect(String select)- 
Methods inherited from class org.apache.tika.pipes.pipesiterator.PipesIteratorbuild, 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.ConfigBasebuildComposite, buildComposite, buildSingle, buildSingle, configure, handleSettings
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface java.lang.IterableforEach, spliterator
 
- 
 
- 
- 
- 
Method Detail- 
setFetchKeyRangeStartColumn@Field public void setFetchKeyRangeStartColumn(String fetchKeyRangeStartColumn) 
 - 
setFetchKeyRangeEndColumn@Field public void setFetchKeyRangeEndColumn(String fetchKeyRangeEndColumn) 
 - 
getSelectpublic String getSelect() 
 - 
setFetchSize@Field public void setFetchSize(int fetchSize) throws TikaConfigException - Throws:
- TikaConfigException
 
 - 
setQueryTimeoutSecondspublic void setQueryTimeoutSeconds(int seconds) 
 - 
enqueueprotected void enqueue() throws InterruptedException, IOException, TimeoutException- Specified by:
- enqueuein class- PipesIterator
- Throws:
- InterruptedException
- IOException
- TimeoutException
 
 - 
initializepublic void initialize(Map<String,Param> params) throws TikaConfigException - Specified by:
- initializein interface- Initializable
- Overrides:
- initializein class- PipesIterator
- Parameters:
- params- params to use for initialization
- Throws:
- TikaConfigException
 
 - 
checkInitializationpublic void checkInitialization(InitializableProblemHandler problemHandler) throws TikaConfigException - Specified by:
- checkInitializationin interface- Initializable
- Overrides:
- checkInitializationin class- PipesIterator
- Parameters:
- problemHandler- if there is a problem and no custom initializableProblemHandler has been configured via Initializable parameters, this is called to respond.
- Throws:
- TikaConfigException
 
 
- 
 
-