Class PipesIterator
java.lang.Object
org.apache.tika.config.ConfigBase
org.apache.tika.pipes.pipesiterator.PipesIterator
- All Implemented Interfaces:
Iterable<FetchEmitTuple>,Callable<Integer>,Initializable
- Direct Known Subclasses:
AZBlobPipesIterator,CSVPipesIterator,FileListPipesIterator,FileSystemPipesIterator,GCSPipesIterator,JDBCPipesIterator,JsonPipesIterator,KafkaPipesIterator,S3PipesIterator,SolrPipesIterator
public abstract class PipesIterator
extends ConfigBase
implements Callable<Integer>, Iterable<FetchEmitTuple>, Initializable
Abstract class that handles the testing for timeouts/thread safety
issues. Concrete classes implement the blocking
enqueue().
If there's an exception in the enqueuing thread, this will throw
a RuntimeException. It will throw an IllegalStateException if
next() is called after hasNext() has returned false.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PipesIteratorcall()voidcheckInitialization(InitializableProblemHandler problemHandler) protected abstract voidenqueue()protected HandlerConfigvoidinitialize(Map<String, Param> params) iterator()voidsetEmitterName(String emitterName) voidsetFetcherName(String fetcherName) voidsetHandlerType(String handlerType) voidsetMaxEmbeddedResources(int maxEmbeddedResources) voidsetMaxWaitMs(long maxWaitMs) voidsetOnParseException(String onParseException) voidsetOnParseException(FetchEmitTuple.ON_PARSE_EXCEPTION onParseException) voidsetParseMode(String parseModeString) voidsetParseMode(HandlerConfig.PARSE_MODE parseMode) voidsetQueueSize(int queueSize) voidsetThrowOnWriteLimitReached(boolean throwOnWriteLimitReached) voidsetWriteLimit(int writeLimit) protected voidMethods inherited from class org.apache.tika.config.ConfigBase
buildComposite, buildComposite, buildSingle, buildSingle, configure, handleSettingsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
DEFAULT_MAX_WAIT_MS
public static final long DEFAULT_MAX_WAIT_MS- See Also:
-
DEFAULT_QUEUE_SIZE
public static final int DEFAULT_QUEUE_SIZE- See Also:
-
COMPLETED_SEMAPHORE
-
-
Constructor Details
-
PipesIterator
public PipesIterator()
-
-
Method Details
-
build
- Throws:
IOExceptionTikaConfigException
-
getFetcherName
-
setFetcherName
-
getEmitterName
-
setEmitterName
-
setMaxWaitMs
-
setQueueSize
-
getOnParseException
-
setOnParseException
- Throws:
TikaConfigException
-
setOnParseException
-
setHandlerType
-
setWriteLimit
-
setThrowOnWriteLimitReached
-
setMaxEmbeddedResources
-
setParseMode
-
setParseMode
-
call
-
getHandlerConfig
-
enqueue
-
tryToAdd
- Throws:
InterruptedExceptionTimeoutException
-
initialize
- Specified by:
initializein interfaceInitializable- Parameters:
params- params to use for initialization- Throws:
TikaConfigException
-
checkInitialization
public void checkInitialization(InitializableProblemHandler problemHandler) throws TikaConfigException - Specified by:
checkInitializationin 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
-
iterator
- Specified by:
iteratorin interfaceIterable<FetchEmitTuple>
-