Class MultiThreadedReader.HBaseReaderThread

java.lang.Object
java.lang.Thread
org.apache.hadoop.hbase.util.MultiThreadedReader.HBaseReaderThread
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
IntegrationTestTimeBoundedRequestsWithRegionReplicas.TimeBoundedMultiThreadedReader.TimeBoundedMultiThreadedReaderThread, MultiThreadedReaderWithACL.HBaseReaderThreadWithACL
Enclosing class:
MultiThreadedReader

  • Field Details

    • readerId

      protected final int readerId
    • table

      protected final org.apache.hadoop.hbase.client.Table table
    • curKey

      private long curKey
      The "current" key being read. Increases from startKey to endKey.
    • startTimeMs

      protected long startTimeMs
      Time when the thread started
    • readingRandomKey

      private boolean readingRandomKey
      If we are ahead of the writer and reading a random key.
    • printExceptionTrace

      private boolean printExceptionTrace
  • Constructor Details

  • Method Details

    • createTable

      protected org.apache.hadoop.hbase.client.Table createTable() throws IOException
      Throws:
      IOException
    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • closeTable

      protected void closeTable()
    • runReader

      private void runReader()
    • maxKeyWeCanRead

      private long maxKeyWeCanRead()
      Should only be used for the concurrent writer/reader workload. The maximum key we are allowed to read, subject to the "key window" constraint.
    • getNextKeyToRead

      protected long getNextKeyToRead()
    • readKey

      private org.apache.hadoop.hbase.client.Get[] readKey(long[] keysToRead)
    • createGet

      protected org.apache.hadoop.hbase.client.Get createGet(long keyToRead) throws IOException
      Throws:
      IOException
    • queryKey

      public void queryKey(org.apache.hadoop.hbase.client.Get[] gets, boolean verify, long[] keysToRead) throws IOException
      Throws:
      IOException
    • queryKey

      public void queryKey(org.apache.hadoop.hbase.client.Get get, boolean verify, long keyToRead) throws IOException
      Throws:
      IOException
    • verifyResultsAndUpdateMetrics

      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
      Throws:
      IOException
    • verifyResultsAndUpdateMetrics

      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
      Throws:
      IOException
    • verifyResultsAndUpdateMetricsOnAPerGetBasis

      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
      Throws:
      IOException