Class TestNamedQueueRecorder
java.lang.Object
org.apache.hadoop.hbase.namequeues.TestNamedQueueRecorder
Tests for Online SlowLog Provider Service
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static final List<org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair>
private static final HBaseTestingUtility
private static int
private static final org.slf4j.Logger
private org.apache.hadoop.hbase.namequeues.NamedQueueRecorder
private static final List<org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static org.apache.hadoop.conf.Configuration
applySlowLogRecorderConf
(int eventSize) private boolean
confirmPayloadParams
(int i, int j, List<org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog.SlowLogPayload> slowLogPayloads) confirm that for a ringbuffer of slow logs, payload on given index of buffer has expected elementsprivate static org.apache.hbase.thirdparty.com.google.protobuf.Message
getMessage
(Optional<Integer> forcedParamIndex) private static org.apache.hadoop.hbase.ipc.RpcCall
getRpcCall
(String userName) private static org.apache.hadoop.hbase.ipc.RpcCall
getRpcCall
(String userName, int forcedParamIndex) private static org.apache.hadoop.hbase.ipc.RpcCall
getRpcCall
(String userName, Optional<Integer> forcedParamIndex) (package private) static org.apache.hadoop.hbase.namequeues.RpcLogDetails
getRpcLogDetails
(String userName, String clientAddress, String className) private org.apache.hadoop.hbase.namequeues.RpcLogDetails
getRpcLogDetails
(String userName, String clientAddress, String className, boolean isSlowLog, boolean isLargeLog) (package private) static org.apache.hadoop.hbase.namequeues.RpcLogDetails
getRpcLogDetails
(String userName, String clientAddress, String className, int forcedParamIndex) private static org.apache.hadoop.hbase.namequeues.RpcLogDetails
private List<org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog.SlowLogPayload>
getSlowLogPayloads
(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.SlowLogResponseRequest request) private static Optional<org.apache.hadoop.hbase.security.User>
void
void
void
void
void
void
void
void
void
void
void
void
void
-
Field Details
-
CLASS_RULE
-
LOG
-
HBASE_TESTING_UTILITY
-
REQUEST_HEADERS
private static final List<org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair> REQUEST_HEADERS -
CONNECTION_HEADERS
private static final List<org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair> CONNECTION_HEADERS -
namedQueueRecorder
-
i
-
-
Constructor Details
-
TestNamedQueueRecorder
public TestNamedQueueRecorder()
-
-
Method Details
-
applySlowLogRecorderConf
-
confirmPayloadParams
private boolean confirmPayloadParams(int i, int j, List<org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog.SlowLogPayload> slowLogPayloads) confirm that for a ringbuffer of slow logs, payload on given index of buffer has expected elements- Parameters:
i
- index of ringbuffer logsj
- data value that was put on index islowLogPayloads
- list of payload retrieved fromNamedQueueRecorder
- Returns:
- if actual values are as per expectations
-
testOnlieSlowLogConsumption
- Throws:
Exception
-
getSlowLogPayloads
private List<org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog.SlowLogPayload> getSlowLogPayloads(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.SlowLogResponseRequest request) -
testOnlineSlowLogWithHighRecords
- Throws:
Exception
-
testOnlineSlowLogWithDefaultDisableConfig
- Throws:
Exception
-
testOnlineSlowLogWithDisableConfig
- Throws:
Exception
-
testSlowLogFilters
- Throws:
Exception
-
testConcurrentSlowLogEvents
- Throws:
Exception
-
testSlowLargeLogEvents
- Throws:
Exception
-
testSlowLogMixedFilters
- Throws:
Exception
-
testOnlineSlowLogScanPayloadDefaultDisabled
- Throws:
Exception
-
testOnlineSlowLogScanPayloadExplicitlyDisabled
- Throws:
Exception
-
testOnlineSlowLogScanPayloadExplicitlyEnabled
- Throws:
Exception
-
testOnlineSlowLogRequestAttributes
- Throws:
Exception
-
testOnlineSlowLogConnectionAttributes
- Throws:
Exception
-
getRpcLogDetails
static org.apache.hadoop.hbase.namequeues.RpcLogDetails getRpcLogDetails(String userName, String clientAddress, String className, int forcedParamIndex) -
getRpcLogDetails
static org.apache.hadoop.hbase.namequeues.RpcLogDetails getRpcLogDetails(String userName, String clientAddress, String className) -
getRpcLogDetailsOfScan
-
getRpcLogDetails
private org.apache.hadoop.hbase.namequeues.RpcLogDetails getRpcLogDetails(String userName, String clientAddress, String className, boolean isSlowLog, boolean isLargeLog) -
getRpcCall
-
getRpcCall
private static org.apache.hadoop.hbase.ipc.RpcCall getRpcCall(String userName, int forcedParamIndex) -
getRpcCall
private static org.apache.hadoop.hbase.ipc.RpcCall getRpcCall(String userName, Optional<Integer> forcedParamIndex) -
getMessage
private static org.apache.hbase.thirdparty.com.google.protobuf.Message getMessage(Optional<Integer> forcedParamIndex) -
getUser
-