public class AddIndexesTask extends PerfTask
IndexWriter.addIndexes(Directory...)
or
IndexWriter.addIndexes(CodecReader...)
. The location of the input
index is specified by the parameter ADDINDEXES_INPUT_DIR
and is
assumed to be a directory on the file system.
Takes optional parameter useAddIndexesDir
which specifies which
addIndexes variant to use (defaults to true, to use addIndexes(Directory)).
Modifier and Type | Field and Description |
---|---|
static String |
ADDINDEXES_INPUT_DIR |
Constructor and Description |
---|
AddIndexesTask(PerfRunData runData) |
Modifier and Type | Method and Description |
---|---|
int |
doLogic()
Perform the task once (ignoring repetitions specification)
Return number of work items done by this task.
|
void |
setParams(String params)
Set the params (useAddIndexesDir only)
|
void |
setup()
Task setup work that should not be measured for that specific task.
|
boolean |
supportsParams()
Sub classes that support parameters must override this method to return
true.
|
void |
tearDown()
Task tearDown work that should not be measured for that specific task.
|
clone, close, getAlgLineNum, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setAlgLineNum, setDepth, setDisableCounting, setName, setRunInBackground, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, toString
public static final String ADDINDEXES_INPUT_DIR
public AddIndexesTask(PerfRunData runData)
public void setup() throws Exception
PerfTask
PerfTask.doLogic()
to this method. Only the work done in PerfTask.doLogic()
is measured for this task. Notice that higher level (sequence) tasks
containing this task would then measure larger time than the sum of their
contained tasks.public int doLogic() throws Exception
PerfTask
public void setParams(String params)
setParams
in class PerfTask
params
- useAddIndexesDir=true
for using
IndexWriter.addIndexes(Directory...)
or false
for
using IndexWriter.addIndexes(CodecReader...)
. Defaults to
true
.public boolean supportsParams()
PerfTask
supportsParams
in class PerfTask
public void tearDown() throws Exception
PerfTask
PerfTask.doLogic()
to this method. Only the work done in PerfTask.doLogic()
is measured for this task. Notice that higher level (sequence) tasks
containing this task would then measure larger time than the sum of their
contained tasks.Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.