Package org.apache.hadoop.hbase.util
Class MultiThreadedReader
java.lang.Object
org.apache.hadoop.hbase.util.MultiThreadedAction
org.apache.hadoop.hbase.util.MultiThreadedReader
- Direct Known Subclasses:
MultiThreadedReaderWithACL
Creates multiple threads that read and verify previously written data
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.util.MultiThreadedAction
MultiThreadedAction.DefaultDataGenerator
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
private int
static final int
Default batch size for multigetsstatic final int
Default "window" size between the last key written by the writer and the key that we attempt to read.static final int
Default maximum number of read errors to tolerate before shutting down all readers.private int
private static final org.slf4j.Logger
private int
protected AtomicLong
protected AtomicLong
protected AtomicLong
protected AtomicLong
private final AtomicLong
The number of keys verified in a sequence.protected Set<MultiThreadedReader.HBaseReaderThread>
private int
private final double
protected MultiThreadedWriterBase
Fields inherited from class org.apache.hadoop.hbase.util.MultiThreadedAction
conf, connection, dataGenerator, endKey, numCols, numKeys, numThreads, numThreadsWorking, REPORTING_INTERVAL_MS, startKey, tableName, totalOpTimeMs, verbose
-
Constructor Summary
ConstructorDescriptionMultiThreadedReader
(LoadTestDataGenerator dataGen, org.apache.hadoop.conf.Configuration conf, TableName tableName, double verifyPercent) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addReaderThreads
(int numThreads) protected MultiThreadedReader.HBaseReaderThread
createReaderThread
(int readerId) long
long
long
long
long
void
linkToWriter
(MultiThreadedWriterBase writer) protected String
Returns a task-specific progress stringvoid
setKeyWindow
(int keyWindow) void
setMaxErrors
(int maxErrors) void
setMultiGetBatchSize
(int batchSize) void
setRegionReplicaId
(int regionReplicaId) void
start
(long startKey, long endKey, int numThreads) Methods inherited from class org.apache.hadoop.hbase.util.MultiThreadedAction
appendToStatus, appendToStatus, close, getEndKey, isDone, startThreads, verifyResultAgainstDataGenerator, verifyResultAgainstDataGenerator, waitForFinish
-
Field Details
-
LOG
-
readers
-
verifyPercent
-
aborted
-
writer
-
numUniqueKeysVerified
The number of keys verified in a sequence. This will never be larger than the total number of keys in the range. The reader might also verify random keys when it catches up with the writer. -
DEFAULT_MAX_ERRORS
Default maximum number of read errors to tolerate before shutting down all readers.- See Also:
-
DEFAULT_KEY_WINDOW
Default "window" size between the last key written by the writer and the key that we attempt to read. The lower this number, the stricter our testing is. If this is zero, we always attempt to read the highest key in the contiguous sequence of keys written by the writers.- See Also:
-
DEFAULT_BATCH_SIZE
Default batch size for multigets- See Also:
-
numKeysVerified
-
numReadErrors
-
numReadFailures
-
nullResult
-
maxErrors
-
keyWindow
-
batchSize
-
regionReplicaId
-
-
Constructor Details
-
MultiThreadedReader
public MultiThreadedReader(LoadTestDataGenerator dataGen, org.apache.hadoop.conf.Configuration conf, TableName tableName, double verifyPercent) throws IOException - Throws:
IOException
-
-
Method Details
-
linkToWriter
-
setMaxErrors
-
setKeyWindow
-
setMultiGetBatchSize
-
setRegionReplicaId
-
start
- Overrides:
start
in classMultiThreadedAction
- Throws:
IOException
-
addReaderThreads
- Throws:
IOException
-
createReaderThread
- Throws:
IOException
-
getNumReadFailures
-
getNumReadErrors
-
getNumKeysVerified
-
getNumUniqueKeysVerified
-
getNullResultsCount
-
progressInfo
Description copied from class:MultiThreadedAction
Returns a task-specific progress string- Specified by:
progressInfo
in classMultiThreadedAction
-