Class TestUserScanQueryMatcher

java.lang.Object
org.apache.hadoop.hbase.regionserver.querymatcher.AbstractTestScanQueryMatcher
org.apache.hadoop.hbase.regionserver.querymatcher.TestUserScanQueryMatcher

  • Field Details

  • Constructor Details

  • Method Details

    • testNeverIncludeFakeCell

      public void testNeverIncludeFakeCell() throws IOException
      This is a cryptic test. It is checking that we don't include a fake cell. See HBASE-16074 for background.
      Throws:
      IOException
    • testMatchExplicitColumns

      public void testMatchExplicitColumns() throws IOException
      Throws:
      IOException
    • testMatch_Wildcard

      public void testMatch_Wildcard() throws IOException
      Throws:
      IOException
    • testMatch_ExpiredExplicit

      public void testMatch_ExpiredExplicit() throws IOException
      Verify that ScanQueryMatcher only skips expired KeyValue instances and does not exit early from the row (skipping later non-expired KeyValues). This version mimics a Get with explicitly specified column qualifiers.
      Throws:
      IOException
    • testMatch_ExpiredWildcard

      public void testMatch_ExpiredWildcard() throws IOException
      Verify that ScanQueryMatcher only skips expired KeyValue instances and does not exit early from the row (skipping later non-expired KeyValues). This version mimics a Get with wildcard-inferred column qualifiers.
      Throws:
      IOException
    • testMatchWhenFilterReturnsIncludeAndSeekNextRow

      Throws:
      IOException
    • testMergeFilterResponseCase1

      Here is the unit test for UserScanQueryMatcher#mergeFilterResponse, when the number of cells exceed the versions requested in scan, we should return SEEK_NEXT_COL, but if current match code is INCLUDE_AND_SEEK_NEXT_ROW, we can optimize to choose the max step between SEEK_NEXT_COL and INCLUDE_AND_SEEK_NEXT_ROW, which is SEEK_NEXT_ROW.
      Throws:
      IOException
    • testMergeFilterResponseCase2

      Here is the unit test for UserScanQueryMatcher#mergeFilterResponse: the match code may be changed to SEEK_NEXT_COL or INCLUDE_AND_SEEK_NEXT_COL after merging with filterResponse, even if the passed match code is neither SEEK_NEXT_COL nor INCLUDE_AND_SEEK_NEXT_COL. In that case, we need to make sure that the ColumnTracker has been switched to the next column.
      An effective test way is: we only need to check the cell from getKeyForNextColumn(). because that as long as the UserScanQueryMatcher returns SEEK_NEXT_COL or INCLUDE_AND_SEEK_NEXT_COL, UserScanQueryMatcher#getKeyForNextColumn should return an cell whose column is larger than the current cell's.
      Throws:
      Exception