public static void addSlowLogRecords(final List<TooSlowLog.SlowLogPayload> slowLogPayloads,
    Connection connection) {
    List<Put> puts = new ArrayList<>(slowLogPayloads.size());
    for (TooSlowLog.SlowLogPayload slowLogPayload : slowLogPayloads) {
      final byte[] rowKey = getRowKey(slowLogPayload);
      final Put put = new Put(rowKey).setDurability(Durability.SKIP_WAL)
        .setPriority(HConstants.NORMAL_QOS)
        .addColumn(HConstants.SLOWLOG_INFO_FAMILY, Bytes.toBytes("call_details"),
          Bytes.toBytes(slowLogPayload.getCallDetails()))
        .addColumn(HConstants.SLOWLOG_INFO_FAMILY, Bytes.toBytes("client_address"),
          Bytes.toBytes(slowLogPayload.getClientAddress()))
        .addColumn(HConstants.SLOWLOG_INFO_FAMILY, Bytes.toBytes("method_name"),
          Bytes.toBytes(slowLogPayload.getMethodName()))
        .addColumn(HConstants.SLOWLOG_INFO_FAMILY, Bytes.toBytes("param"),
          Bytes.toBytes(slowLogPayload.getParam()))
        .addColumn(HConstants.SLOWLOG_INFO_FAMILY, Bytes.toBytes("processing_time"),
          Bytes.toBytes(Integer.toString(slowLogPayload.getProcessingTime())))
        .addColumn(HConstants.SLOWLOG_INFO_FAMILY, Bytes.toBytes("queue_time"),
          Bytes.toBytes(Integer.toString(slowLogPayload.getQueueTime())))
        .addColumn(HConstants.SLOWLOG_INFO_FAMILY, Bytes.toBytes("fs_read_time"),
          Bytes.toBytes(Long.toString(slowLogPayload.getFsReadTime())))
        .addColumn(HConstants.SLOWLOG_INFO_FAMILY, Bytes.toBytes("region_name"),
          Bytes.toBytes(slowLogPayload.getRegionName()))
        .addColumn(HConstants.SLOWLOG_INFO_FAMILY, Bytes.toBytes("response_size"),
          Bytes.toBytes(Long.toString(slowLogPayload.getResponseSize())))
        .addColumn(HConstants.SLOWLOG_INFO_FAMILY, Bytes.toBytes("block_bytes_scanned"),
          Bytes.toBytes(Long.toString(slowLogPayload.getBlockBytesScanned())))
        .addColumn(HConstants.SLOWLOG_INFO_FAMILY, Bytes.toBytes("server_class"),
          Bytes.toBytes(slowLogPayload.getServerClass()))
        .addColumn(HConstants.SLOWLOG_INFO_FAMILY, Bytes.toBytes("start_time"),
          Bytes.toBytes(Long.toString(slowLogPayload.getStartTime())))
        .addColumn(HConstants.SLOWLOG_INFO_FAMILY, Bytes.toBytes("type"),
          Bytes.toBytes(slowLogPayload.getType().name()))
        .addColumn(HConstants.SLOWLOG_INFO_FAMILY, Bytes.toBytes("username"),
          Bytes.toBytes(slowLogPayload.getUserName()));
      puts.add(put);
    }
    try {
      doPut(connection, puts);
    } catch (Exception e) {
      LOG.warn("Failed to add slow/large log records to hbase:slowlog table.", e);
    }
  }
Add slow/large log records to hbase:slowlog table
@param slowLogPayloads List of SlowLogPayload to process
@param connection      connection
hbase-client/src/main/java/org/apache/hadoop/hbase/slowlog/SlowLogTableAccessor.java