Class ContentSource
- java.lang.Object
-
- org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
-
- org.apache.lucene.benchmark.byTask.feeds.ContentSource
-
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
DirContentSource,EnwikiContentSource,LineDocSource,LongToEnglishContentSource,ReutersContentSource,SingleDocSource,TrecContentSource
public abstract class ContentSource extends ContentItemsSource
Represents content from a specified source, such as TREC, Reuters etc. AContentSourceis responsible for creatingDocDataobjects for its documents to be consumed byDocMaker. It also keeps track of various statistics, such as how many documents were generated, size in bytes etc.For supported configuration parameters see
ContentItemsSource.
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
encoding, forever, logStep, verbose
-
-
Constructor Summary
Constructors Constructor Description ContentSource()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract DocDatagetNextDocData(DocData docData)Returns the nextDocDatafrom the content source.-
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
addBytes, addItem, close, collectFiles, getBytesCount, getConfig, getItemsCount, getTotalBytesCount, getTotalItemsCount, printStatistics, resetInputs, setConfig, shouldLog
-
-
-
-
Method Detail
-
getNextDocData
public abstract DocData getNextDocData(DocData docData) throws NoMoreDataException, IOException
Returns the nextDocDatafrom the content source. Implementations must account for multi-threading, as multiple threads can call this method simultaneously.- Throws:
NoMoreDataExceptionIOException
-
-