Class MobTestUtil

java.lang.Object
org.apache.hadoop.hbase.mob.MobTestUtil

public class MobTestUtil extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final char
     
    protected static final char
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    assertCellEquals(org.apache.hadoop.hbase.Cell firstKeyValue, org.apache.hadoop.hbase.Cell secondKeyValue)
    Compare two Cells only for their row family qualifier value
    static void
    assertCellsValue(org.apache.hadoop.hbase.client.Table table, org.apache.hadoop.hbase.client.Scan scan, byte[] expectedValue, int expectedCount)
     
    static int
    countMobRows(org.apache.hadoop.hbase.client.Table table)
    Gets the number of rows in the given table.
    static org.apache.hadoop.fs.Path
    generateMOBFileForRegion(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.client.ColumnFamilyDescriptor familyDescriptor, String regionName)
     
    protected static String
    generateRandomString(int demoLength)
     
    private static void
    writeStoreFile(org.apache.hadoop.hbase.regionserver.StoreFileWriter writer, byte[] fam, byte[] qualifier)
     
    protected static void
    writeStoreFile(org.apache.hadoop.hbase.regionserver.StoreFileWriter writer, String caseName)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • generateRandomString

      protected static String generateRandomString(int demoLength)
    • writeStoreFile

      protected static void writeStoreFile(org.apache.hadoop.hbase.regionserver.StoreFileWriter writer, String caseName) throws IOException
      Throws:
      IOException
    • writeStoreFile

      private static void writeStoreFile(org.apache.hadoop.hbase.regionserver.StoreFileWriter writer, byte[] fam, byte[] qualifier) throws IOException
      Throws:
      IOException
    • assertCellEquals

      public static void assertCellEquals(org.apache.hadoop.hbase.Cell firstKeyValue, org.apache.hadoop.hbase.Cell secondKeyValue)
      Compare two Cells only for their row family qualifier value
    • assertCellsValue

      public static void assertCellsValue(org.apache.hadoop.hbase.client.Table table, org.apache.hadoop.hbase.client.Scan scan, byte[] expectedValue, int expectedCount) throws IOException
      Throws:
      IOException
    • countMobRows

      public static int countMobRows(org.apache.hadoop.hbase.client.Table table) throws IOException
      Gets the number of rows in the given table.
      Parameters:
      table - to get the scanner
      Returns:
      the number of rows
      Throws:
      IOException
    • generateMOBFileForRegion

      public static org.apache.hadoop.fs.Path generateMOBFileForRegion(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.client.ColumnFamilyDescriptor familyDescriptor, String regionName) throws IOException
      Throws:
      IOException