Class KafkaPipesIterator
java.lang.Object
org.apache.tika.config.ConfigBase
org.apache.tika.pipes.pipesiterator.PipesIterator
org.apache.tika.pipes.pipesiterator.kafka.KafkaPipesIterator
- All Implemented Interfaces:
Iterable<FetchEmitTuple>,Callable<Integer>,Initializable
-
Field Summary
Fields inherited from class org.apache.tika.pipes.pipesiterator.PipesIterator
COMPLETED_SEMAPHORE, DEFAULT_MAX_WAIT_MS, DEFAULT_QUEUE_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckInitialization(InitializableProblemHandler problemHandler) protected voidenqueue()voidinitialize(Map<String, Param> params) voidsetAutoOffsetReset(String autoOffsetReset) voidsetBootstrapServers(String bootstrapServers) voidsetEmitMax(int emitMax) If the kafka pipe iterator will keep polling for more documents until it returns an empty result.voidsetGroupId(String groupId) voidsetGroupInitialRebalanceDelayMs(int groupInitialRebalanceDelayMs) voidsetKeySerializer(String keySerializer) voidsetPollDelayMs(int pollDelayMs) voidvoidsetValueSerializer(String valueSerializer) 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, setThrowOnWriteLimitReached, setWriteLimit, tryToAddMethods 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
-
Constructor Details
-
KafkaPipesIterator
public KafkaPipesIterator()
-
-
Method Details
-
setTopic
-
setGroupId
-
setBootstrapServers
-
setKeySerializer
-
setAutoOffsetReset
-
setValueSerializer
-
setPollDelayMs
-
setGroupInitialRebalanceDelayMs
-
setEmitMax
If the kafka pipe iterator will keep polling for more documents until it returns an empty result. If you set emitMax is set to > 0, it will stop polling if the number of documents you have emitted so far > emitMax. -
initialize
- Specified by:
initializein interfaceInitializable- Overrides:
initializein classPipesIterator- Parameters:
params- params to use for initialization
-
checkInitialization
public void checkInitialization(InitializableProblemHandler problemHandler) throws TikaConfigException - Specified by:
checkInitializationin interfaceInitializable- Overrides:
checkInitializationin 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
-
enqueue
- Specified by:
enqueuein classPipesIterator- Throws:
InterruptedExceptionTimeoutException
-