|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.benchmark.byTask.feeds.BasicDocMaker
public abstract class BasicDocMaker
Create documents for the test. Maintains counters of chars etc. so that sub-classes just need to provide textual content, and the create-by-size is handled here.
| Field Summary | |
|---|---|
protected Config |
config
|
protected Field.Index |
indexVal
|
protected Field.Store |
storeVal
|
protected Field.TermVector |
termVecVal
|
| Constructor Summary | |
|---|---|
BasicDocMaker()
|
|
| Method Summary | |
|---|---|
protected void |
addBytes(long n)
|
protected void |
addUniqueBytes(long n)
|
protected void |
collectFiles(File f,
ArrayList inputFiles)
|
long |
getByteCount()
Return total byte size of docs made since last reset. |
int |
getCount()
Return number of docs made since last reset. |
protected abstract org.apache.lucene.benchmark.byTask.feeds.BasicDocMaker.DocData |
getNextDocData()
Return the data of the next document. |
Document |
makeDocument()
Create the next document. |
Document |
makeDocument(int size)
Create the next document, of the given size by input bytes. |
long |
numUniqueBytes()
Return total bytes of all available unique texts, 0 if not applicable |
void |
printDocStatistics()
Print some statistics on docs available/added/etc. |
void |
resetInputs()
Reset inputs so that the test run would behave, input wise, as if it just started. |
void |
setConfig(Config config)
Set the properties |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.lucene.benchmark.byTask.feeds.DocMaker |
|---|
numUniqueTexts |
| Field Detail |
|---|
protected Config config
protected Field.Store storeVal
protected Field.Index indexVal
protected Field.TermVector termVecVal
| Constructor Detail |
|---|
public BasicDocMaker()
| Method Detail |
|---|
protected abstract org.apache.lucene.benchmark.byTask.feeds.BasicDocMaker.DocData getNextDocData()
throws Exception
if - cannot create the next doc data
Exception
public Document makeDocument()
throws Exception
DocMaker
makeDocument in interface DocMakerException
public Document makeDocument(int size)
throws Exception
DocMaker
makeDocument in interface DocMakersize - size of document, or 0 if there is no size requirement.
Exceptionpublic void setConfig(Config config)
DocMaker
setConfig in interface DocMakerpublic void resetInputs()
DocMaker
resetInputs in interface DocMakerpublic long numUniqueBytes()
DocMaker
numUniqueBytes in interface DocMakerpublic int getCount()
DocMaker
getCount in interface DocMakerpublic long getByteCount()
DocMaker
getByteCount in interface DocMakerprotected void addUniqueBytes(long n)
protected void addBytes(long n)
public void printDocStatistics()
DocMaker
printDocStatistics in interface DocMaker
protected void collectFiles(File f,
ArrayList inputFiles)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||