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
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final booleanprivate static final org.slf4j.Loggerprivate static final Stringprivate final SlowLogPersistentServiceprivate final Queue<org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog.SlowLogPayload>private final boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Collection<org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair>buildNameBytesPairs(Map<String, byte[]> attributes) booleanCleans up queues maintained by services.voidconsumeEventFromDisruptor(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.TypegetLogType(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) voidpersistAll(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:NamedQueueServiceRetrieve event type for NamedQueueService implementation.- Specified by:
getEventin 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:
consumeEventFromDisruptorin 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:NamedQueueServiceCleans up queues maintained by services.- Specified by:
clearNamedQueuein interfaceNamedQueueService- Returns:
- true if slow log payloads are cleaned up, false otherwise
-
getNamedQueueRecords
Description copied from interface:NamedQueueServiceRetrieve in memory queue records from ringbuffer- Specified by:
getNamedQueueRecordsin 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:
persistAllin 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)
-