Class SlowLogTableAccessor

java.lang.Object
org.apache.hadoop.hbase.slowlog.SlowLogTableAccessor

@Private public class SlowLogTableAccessor extends Object
Slowlog Accessor to record slow/large RPC log identified at each RegionServer RpcServer level. This can be done only optionally to record the entire history of slow/large rpc calls since RingBuffer can handle only limited latest records.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final org.slf4j.Logger
     
    static final TableName
    hbase:slowlog table name - can be enabled with config - hbase.regionserver.slowlog.systable.enabled
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addSlowLogRecords(List<org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog.SlowLogPayload> slowLogPayloads, Connection connection)
    Add slow/large log records to hbase:slowlog table
    private static void
    doPut(Connection connection, List<Put> puts)
     
    private static byte[]
    getRowKey(org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog.SlowLogPayload slowLogPayload)
    Create rowKey: currentTime APPEND slowLogPayload.hashcode Scan on slowlog table should keep records with sorted order of time, however records added at the very same time could be in random order.

    Methods inherited from class java.lang.Object

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

    • LOG

      private static final org.slf4j.Logger LOG
    • SLOW_LOG_TABLE_NAME

      public static final TableName SLOW_LOG_TABLE_NAME
      hbase:slowlog table name - can be enabled with config - hbase.regionserver.slowlog.systable.enabled
  • Constructor Details

  • Method Details

    • doPut

      private static void doPut(Connection connection, List<Put> puts) throws IOException
      Throws:
      IOException
    • addSlowLogRecords

      public static void addSlowLogRecords(List<org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog.SlowLogPayload> slowLogPayloads, Connection connection)
      Add slow/large log records to hbase:slowlog table
      Parameters:
      slowLogPayloads - List of SlowLogPayload to process
      connection - connection
    • getRowKey

      private static byte[] getRowKey(org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog.SlowLogPayload slowLogPayload)
      Create rowKey: currentTime APPEND slowLogPayload.hashcode Scan on slowlog table should keep records with sorted order of time, however records added at the very same time could be in random order.
      Parameters:
      slowLogPayload - SlowLogPayload to process
      Returns:
      rowKey byte[]