Class SlowLogQueueService
java.lang.Object
org.apache.hadoop.hbase.namequeues.impl.SlowLogQueueService
- All Implemented Interfaces:
NamedQueueService
In-memory Queue service provider for Slow/LargeLog events
-
Field Summary
Modifier and TypeFieldDescriptionprivate final boolean
private final boolean
private static final org.slf4j.Logger
private static final String
private final SlowLogPersistentService
private final Queue<org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog.SlowLogPayload>
private final boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static Collection<org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair>
buildNameBytesPairs
(Map<String, byte[]> attributes) boolean
Cleans up queues maintained by services.void
consumeEventFromDisruptor
(NamedQueuePayload namedQueuePayload) This implementation is specific to slowLog event.getEvent()
Retrieve event type for NamedQueueService implementation.private List<org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog.SlowLogPayload>
getLargeLogPayloads
(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.SlowLogResponseRequest request) private org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog.SlowLogPayload.Type
getLogType
(RpcLogDetails rpcCallDetails) getNamedQueueRecords
(NamedQueueGetRequest request) Retrieve in memory queue records from ringbufferprivate List<org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog.SlowLogPayload>
getSlowLogPayloads
(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.SlowLogResponseRequest request) void
persistAll
(Connection connection) Add all slowLog events to system table.
-
Field Details
-
LOG
-
SLOW_LOG_RING_BUFFER_SIZE
- See Also:
-
isOnlineLogProviderEnabled
-
isSlowLogTableEnabled
-
slowLogPersistentService
-
slowLogQueue
private final Queue<org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog.SlowLogPayload> slowLogQueue -
slowLogScanPayloadEnabled
-
-
Constructor Details
-
SlowLogQueueService
-
-
Method Details
-
getEvent
Description copied from interface:NamedQueueService
Retrieve event type for NamedQueueService implementation.- Specified by:
getEvent
in interfaceNamedQueueService
- Returns:
NamedQueuePayload.NamedQueueEvent
-
consumeEventFromDisruptor
This implementation is specific to slowLog event. This consumes slowLog event from disruptor and inserts records to EvictingQueue.- Specified by:
consumeEventFromDisruptor
in interfaceNamedQueueService
- Parameters:
namedQueuePayload
- namedQueue payload from disruptor ring buffer
-
buildNameBytesPairs
private static Collection<org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair> buildNameBytesPairs(Map<String, byte[]> attributes) -
clearNamedQueue
Description copied from interface:NamedQueueService
Cleans up queues maintained by services.- Specified by:
clearNamedQueue
in interfaceNamedQueueService
- Returns:
- true if slow log payloads are cleaned up, false otherwise
-
getNamedQueueRecords
Description copied from interface:NamedQueueService
Retrieve in memory queue records from ringbuffer- Specified by:
getNamedQueueRecords
in interfaceNamedQueueService
- Parameters:
request
- namedQueue request with event type- Returns:
- queue records from ringbuffer after filter (if applied)
-
getLogType
private org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog.SlowLogPayload.Type getLogType(RpcLogDetails rpcCallDetails) -
persistAll
Add all slowLog events to system table. This is only for slowLog event's persistence on system table.- Specified by:
persistAll
in interfaceNamedQueueService
-
getSlowLogPayloads
private List<org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog.SlowLogPayload> getSlowLogPayloads(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.SlowLogResponseRequest request) -
getLargeLogPayloads
private List<org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog.SlowLogPayload> getLargeLogPayloads(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.SlowLogResponseRequest request)
-