public class MultiThreadedReader extends MultiThreadedAction
Modifier and Type | Class and Description |
---|---|
class |
MultiThreadedReader.HBaseReaderThread |
MultiThreadedAction.DefaultDataGenerator
Modifier and Type | Field and Description |
---|---|
protected boolean |
aborted |
static int |
DEFAULT_BATCH_SIZE
Default batch size for multigets
|
static int |
DEFAULT_KEY_WINDOW
Default "window" size between the last key written by the writer and the
key that we attempt to read.
|
static int |
DEFAULT_MAX_ERRORS
Default maximum number of read errors to tolerate before shutting down all
readers.
|
protected AtomicLong |
nullResult |
protected AtomicLong |
numKeysVerified |
protected AtomicLong |
numReadErrors |
protected AtomicLong |
numReadFailures |
protected Set<MultiThreadedReader.HBaseReaderThread> |
readers |
protected MultiThreadedWriterBase |
writer |
conf, connection, dataGenerator, endKey, numCols, numKeys, numThreads, numThreadsWorking, REPORTING_INTERVAL_MS, startKey, tableName, totalOpTimeMs, verbose
Constructor and Description |
---|
MultiThreadedReader(LoadTestDataGenerator dataGen,
Configuration conf,
TableName tableName,
double verifyPercent) |
Modifier and Type | Method and Description |
---|---|
protected void |
addReaderThreads(int numThreads) |
protected MultiThreadedReader.HBaseReaderThread |
createReaderThread(int readerId) |
long |
getNullResultsCount() |
long |
getNumKeysVerified() |
long |
getNumReadErrors() |
long |
getNumReadFailures() |
long |
getNumUniqueKeysVerified() |
void |
linkToWriter(MultiThreadedWriterBase writer) |
protected String |
progressInfo()
Returns a task-specific progress string
|
void |
setKeyWindow(int keyWindow) |
void |
setMaxErrors(int maxErrors) |
void |
setMultiGetBatchSize(int batchSize) |
void |
setRegionReplicaId(int regionReplicaId) |
void |
start(long startKey,
long endKey,
int numThreads) |
appendToStatus, appendToStatus, close, getEndKey, isDone, startThreads, verifyResultAgainstDataGenerator, verifyResultAgainstDataGenerator, waitForFinish
protected Set<MultiThreadedReader.HBaseReaderThread> readers
protected volatile boolean aborted
protected MultiThreadedWriterBase writer
public static final int DEFAULT_MAX_ERRORS
public static final int DEFAULT_KEY_WINDOW
public static final int DEFAULT_BATCH_SIZE
protected AtomicLong numKeysVerified
protected AtomicLong numReadErrors
protected AtomicLong numReadFailures
protected AtomicLong nullResult
public MultiThreadedReader(LoadTestDataGenerator dataGen, Configuration conf, TableName tableName, double verifyPercent) throws IOException
IOException
public void linkToWriter(MultiThreadedWriterBase writer)
public void setMaxErrors(int maxErrors)
public void setKeyWindow(int keyWindow)
public void setMultiGetBatchSize(int batchSize)
public void setRegionReplicaId(int regionReplicaId)
public void start(long startKey, long endKey, int numThreads) throws IOException
start
in class MultiThreadedAction
IOException
protected void addReaderThreads(int numThreads) throws IOException
IOException
protected MultiThreadedReader.HBaseReaderThread createReaderThread(int readerId) throws IOException
IOException
public long getNumReadFailures()
public long getNumReadErrors()
public long getNumKeysVerified()
public long getNumUniqueKeysVerified()
public long getNullResultsCount()
protected String progressInfo()
MultiThreadedAction
progressInfo
in class MultiThreadedAction