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 |
private int |
batchSize |
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.
|
private int |
keyWindow |
private static org.slf4j.Logger |
LOG |
private int |
maxErrors |
protected AtomicLong |
nullResult |
protected AtomicLong |
numKeysVerified |
protected AtomicLong |
numReadErrors |
protected AtomicLong |
numReadFailures |
private AtomicLong |
numUniqueKeysVerified
The number of keys verified in a sequence.
|
protected Set<MultiThreadedReader.HBaseReaderThread> |
readers |
private int |
regionReplicaId |
private double |
verifyPercent |
protected MultiThreadedWriterBase |
writer |
conf, connection, dataGenerator, endKey, numCols, numKeys, numThreads, numThreadsWorking, REPORTING_INTERVAL_MS, startKey, tableName, totalOpTimeMs, verbose
Constructor and Description |
---|
MultiThreadedReader(LoadTestDataGenerator dataGen,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.hbase.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
private static final org.slf4j.Logger LOG
protected Set<MultiThreadedReader.HBaseReaderThread> readers
private final double verifyPercent
protected volatile boolean aborted
protected MultiThreadedWriterBase writer
private final AtomicLong numUniqueKeysVerified
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
private int maxErrors
private int keyWindow
private int batchSize
private int regionReplicaId
public MultiThreadedReader(LoadTestDataGenerator dataGen, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.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
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.