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:
IntegrationTestTimeBoundedRequestsWithRegionReplicas.TimeBoundedMultiThreadedReader,MultiThreadedReaderWithACL
Creates multiple threads that read and verify previously written data
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.apache.hadoop.hbase.util.MultiThreadedAction
MultiThreadedAction.DefaultDataGenerator -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprivate intstatic final intDefault batch size for multigetsstatic final intDefault "window" size between the last key written by the writer and the key that we attempt to read.static final intDefault maximum number of read errors to tolerate before shutting down all readers.private intprivate static final org.slf4j.Loggerprivate intprotected AtomicLongprotected AtomicLongprotected AtomicLongprotected AtomicLongprivate final AtomicLongThe number of keys verified in a sequence.protected Set<MultiThreadedReader.HBaseReaderThread>private intprivate final doubleprotected MultiThreadedWriterBaseFields 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
ConstructorsConstructorDescriptionMultiThreadedReader(LoadTestDataGenerator dataGen, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.TableName tableName, double verifyPercent) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddReaderThreads(int numThreads) protected MultiThreadedReader.HBaseReaderThreadcreateReaderThread(int readerId) longlonglonglonglongvoidlinkToWriter(MultiThreadedWriterBase writer) protected StringReturns a task-specific progress stringvoidsetKeyWindow(int keyWindow) voidsetMaxErrors(int maxErrors) voidsetMultiGetBatchSize(int batchSize) voidsetRegionReplicaId(int regionReplicaId) voidstart(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, org.apache.hadoop.hbase.TableName tableName, double verifyPercent) throws IOException - Throws:
IOException
-
-
Method Details
-
linkToWriter
-
setMaxErrors
-
setKeyWindow
-
setMultiGetBatchSize
-
setRegionReplicaId
-
start
- Overrides:
startin classMultiThreadedAction- Throws:
IOException
-
addReaderThreads
- Throws:
IOException
-
createReaderThread
- Throws:
IOException
-
getNumReadFailures
-
getNumReadErrors
-
getNumKeysVerified
-
getNumUniqueKeysVerified
-
getNullResultsCount
-
progressInfo
Description copied from class:MultiThreadedActionReturns a task-specific progress string- Specified by:
progressInfoin classMultiThreadedAction
-