@InterfaceAudience.Private @InterfaceStability.Evolving public class SlowLogRecorder extends Object
Modifier and Type | Field and Description |
---|---|
private com.lmax.disruptor.dsl.Disruptor<RingBufferEnvelope> |
disruptor |
private int |
eventCount |
private boolean |
isOnlineLogProviderEnabled |
private LogEventHandler |
logEventHandler |
private static String |
SLOW_LOG_RING_BUFFER_SIZE |
Constructor and Description |
---|
SlowLogRecorder(org.apache.hadoop.conf.Configuration conf)
Initialize disruptor with configurable ringbuffer size
|
Modifier and Type | Method and Description |
---|---|
void |
addAllLogsToSysTable()
Poll from queueForSysTable and insert 100 records in hbase:slowlog table in single batch
|
void |
addSlowLogPayload(RpcLogDetails rpcLogDetails)
Add slow log rpcCall details to ringbuffer
|
boolean |
clearSlowLogPayloads()
clears slow log payloads from ringbuffer
|
private int |
getEventCount() |
List<org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog.SlowLogPayload> |
getLargeLogPayloads(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.SlowLogResponseRequest request)
Retrieve online large logs from ringbuffer
|
List<org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog.SlowLogPayload> |
getSlowLogPayloads(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.SlowLogResponseRequest request)
Retrieve online slow logs from ringbuffer
|
private final com.lmax.disruptor.dsl.Disruptor<RingBufferEnvelope> disruptor
private final LogEventHandler logEventHandler
private final int eventCount
private final boolean isOnlineLogProviderEnabled
private static final String SLOW_LOG_RING_BUFFER_SIZE
public SlowLogRecorder(org.apache.hadoop.conf.Configuration conf)
private int getEventCount()
public List<org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog.SlowLogPayload> getSlowLogPayloads(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.SlowLogResponseRequest request)
request
- slow log request parameterspublic List<org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog.SlowLogPayload> getLargeLogPayloads(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.SlowLogResponseRequest request)
request
- large log request parameterspublic boolean clearSlowLogPayloads()
public void addSlowLogPayload(RpcLogDetails rpcLogDetails)
rpcLogDetails
- all details of rpc call that would be useful for ring buffer
consumerspublic void addAllLogsToSysTable()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.