public class MultiThreadedReader.HBaseReaderThread extends Thread
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
private long |
curKey
The "current" key being read.
|
private boolean |
printExceptionTrace |
protected int |
readerId |
private boolean |
readingRandomKey
If we are ahead of the writer and reading a random key.
|
protected long |
startTimeMs
Time when the thread started
|
protected org.apache.hadoop.hbase.client.Table |
table |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
HBaseReaderThread(int readerId) |
Modifier and Type | Method and Description |
---|---|
protected void |
closeTable() |
protected org.apache.hadoop.hbase.client.Get |
createGet(long keyToRead) |
protected org.apache.hadoop.hbase.client.Table |
createTable() |
protected long |
getNextKeyToRead() |
private long |
maxKeyWeCanRead()
Should only be used for the concurrent writer/reader workload.
|
void |
queryKey(org.apache.hadoop.hbase.client.Get[] gets,
boolean verify,
long[] keysToRead) |
void |
queryKey(org.apache.hadoop.hbase.client.Get get,
boolean verify,
long keyToRead) |
private org.apache.hadoop.hbase.client.Get[] |
readKey(long[] keysToRead) |
void |
run() |
private void |
runReader() |
protected void |
verifyResultsAndUpdateMetrics(boolean verify,
org.apache.hadoop.hbase.client.Get[] gets,
long elapsedNano,
org.apache.hadoop.hbase.client.Result[] results,
org.apache.hadoop.hbase.client.Table table,
boolean isNullExpected) |
protected void |
verifyResultsAndUpdateMetrics(boolean verify,
org.apache.hadoop.hbase.client.Get get,
long elapsedNano,
org.apache.hadoop.hbase.client.Result result,
org.apache.hadoop.hbase.client.Table table,
boolean isNullExpected) |
private void |
verifyResultsAndUpdateMetricsOnAPerGetBasis(boolean verify,
org.apache.hadoop.hbase.client.Get get,
org.apache.hadoop.hbase.client.Result result,
org.apache.hadoop.hbase.client.Table table,
boolean isNullExpected) |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
protected final int readerId
protected final org.apache.hadoop.hbase.client.Table table
private long curKey
protected long startTimeMs
private boolean readingRandomKey
private boolean printExceptionTrace
public HBaseReaderThread(int readerId) throws IOException
readerId
- only the keys with this remainder from division by MultiThreadedAction.numThreads
will
be read by this threadIOException
protected org.apache.hadoop.hbase.client.Table createTable() throws IOException
IOException
protected void closeTable()
private void runReader()
private long maxKeyWeCanRead()
protected long getNextKeyToRead()
private org.apache.hadoop.hbase.client.Get[] readKey(long[] keysToRead)
protected org.apache.hadoop.hbase.client.Get createGet(long keyToRead) throws IOException
IOException
public void queryKey(org.apache.hadoop.hbase.client.Get[] gets, boolean verify, long[] keysToRead) throws IOException
IOException
public void queryKey(org.apache.hadoop.hbase.client.Get get, boolean verify, long keyToRead) throws IOException
IOException
protected void verifyResultsAndUpdateMetrics(boolean verify, org.apache.hadoop.hbase.client.Get[] gets, long elapsedNano, org.apache.hadoop.hbase.client.Result[] results, org.apache.hadoop.hbase.client.Table table, boolean isNullExpected) throws IOException
IOException
protected void verifyResultsAndUpdateMetrics(boolean verify, org.apache.hadoop.hbase.client.Get get, long elapsedNano, org.apache.hadoop.hbase.client.Result result, org.apache.hadoop.hbase.client.Table table, boolean isNullExpected) throws IOException
IOException
private void verifyResultsAndUpdateMetricsOnAPerGetBasis(boolean verify, org.apache.hadoop.hbase.client.Get get, org.apache.hadoop.hbase.client.Result result, org.apache.hadoop.hbase.client.Table table, boolean isNullExpected) throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.