|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.benchmark.byTask.tasks.PerfTask org.apache.lucene.benchmark.byTask.tasks.WriteLineDocTask
public class WriteLineDocTask
A task which writes documents, one line per document. Each line is in the
following format: title <TAB> date <TAB> body. The output of this
task can be consumed by
LineDocSource
and is intended
to save the IO overhead of opening a file per document to be indexed.
The format of the output is set according to the output file extension.
Compression is recommended when the output file is expected to be large.
See info on file extensions in
StreamUtils.Type
Supports the following parameters:
DEFAULT_FIELDS
).
DEFAULT_SUFFICIENT_FIELDS
).
Field Summary | |
---|---|
static String[] |
DEFAULT_FIELDS
Fields to be written by default |
static String |
DEFAULT_SUFFICIENT_FIELDS
Default fields which at least one of them is required to not skip the doc. |
static String |
FIELDS_HEADER_INDICATOR
|
static char |
SEP
|
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask |
---|
logStep, NEW_LINE, params, stopNow |
Constructor Summary | |
---|---|
WriteLineDocTask(PerfRunData runData)
|
Method Summary | |
---|---|
void |
close()
|
int |
doLogic()
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. |
protected String |
getLogMessage(int recsCount)
|
void |
setParams(String params)
Set the params (docSize only) |
boolean |
supportsParams()
Sub classes that supports parameters must override this method to return true. |
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask |
---|
clone, getBackgroundDeltaPriority, getDepth, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String FIELDS_HEADER_INDICATOR
public static final char SEP
public static final String[] DEFAULT_FIELDS
public static final String DEFAULT_SUFFICIENT_FIELDS
Constructor Detail |
---|
public WriteLineDocTask(PerfRunData runData) throws Exception
Exception
Method Detail |
---|
protected String getLogMessage(int recsCount)
getLogMessage
in class PerfTask
public int doLogic() throws Exception
PerfTask
doLogic
in class PerfTask
Exception
public void close() throws Exception
close
in class PerfTask
Exception
public void setParams(String params)
setParams
in class PerfTask
params
- docSize, or 0 for no limit.public boolean supportsParams()
PerfTask
supportsParams
in class PerfTask
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |