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 SummaryNested ClassesNested classes/interfaces inherited from class org.apache.hadoop.hbase.util.MultiThreadedActionMultiThreadedAction.DefaultDataGenerator
- 
Field SummaryFieldsModifier 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.MultiThreadedActionconf, connection, dataGenerator, endKey, numCols, numKeys, numThreads, numThreadsWorking, REPORTING_INTERVAL_MS, startKey, tableName, totalOpTimeMs, verbose
- 
Constructor SummaryConstructorsConstructorDescriptionMultiThreadedReader(LoadTestDataGenerator dataGen, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.TableName tableName, double verifyPercent) 
- 
Method SummaryModifier 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.MultiThreadedActionappendToStatus, appendToStatus, close, getEndKey, isDone, startThreads, verifyResultAgainstDataGenerator, verifyResultAgainstDataGenerator, waitForFinish
- 
Field Details- 
LOG
- 
readers
- 
verifyPercent
- 
aborted
- 
writer
- 
numUniqueKeysVerifiedThe 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_ERRORSDefault maximum number of read errors to tolerate before shutting down all readers.- See Also:
 
- 
DEFAULT_KEY_WINDOWDefault "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_SIZEDefault batch size for multigets- See Also:
 
- 
numKeysVerified
- 
numReadErrors
- 
numReadFailures
- 
nullResult
- 
maxErrors
- 
keyWindow
- 
batchSize
- 
regionReplicaId
 
- 
- 
Constructor Details- 
MultiThreadedReaderpublic 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 class- MultiThreadedAction
- Throws:
- IOException
 
- 
addReaderThreads- Throws:
- IOException
 
- 
createReaderThread- Throws:
- IOException
 
- 
getNumReadFailures
- 
getNumReadErrors
- 
getNumKeysVerified
- 
getNumUniqueKeysVerified
- 
getNullResultsCount
- 
progressInfoDescription copied from class:MultiThreadedActionReturns a task-specific progress string- Specified by:
- progressInfoin class- MultiThreadedAction
 
 
-