Class TestNamedQueueRecorder
java.lang.Object
org.apache.hadoop.hbase.namequeues.TestNamedQueueRecorder
Tests for Online SlowLog Provider Service
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static final List<org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair>private static final HBaseTestingUtilprivate static intprivate static final org.slf4j.Loggerprivate org.apache.hadoop.hbase.namequeues.NamedQueueRecorderprivate static final List<org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static org.apache.hadoop.conf.ConfigurationapplySlowLogRecorderConf(int eventSize) private booleanconfirmPayloadParams(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.MessagegetMessage(Optional<Integer> forcedParamIndex) private static org.apache.hadoop.hbase.ipc.RpcCallgetRpcCall(String userName) private static org.apache.hadoop.hbase.ipc.RpcCallgetRpcCall(String userName, int forcedParamIndex) private static org.apache.hadoop.hbase.ipc.RpcCallgetRpcCall(String userName, Optional<Integer> forcedParamIndex) (package private) static org.apache.hadoop.hbase.namequeues.RpcLogDetailsgetRpcLogDetails(String userName, String clientAddress, String className) private org.apache.hadoop.hbase.namequeues.RpcLogDetailsgetRpcLogDetails(String userName, String clientAddress, String className, boolean isSlowLog, boolean isLargeLog) (package private) static org.apache.hadoop.hbase.namequeues.RpcLogDetailsgetRpcLogDetails(String userName, String clientAddress, String className, int forcedParamIndex) private static org.apache.hadoop.hbase.namequeues.RpcLogDetailsprivate 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>voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoid
-
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
-
testSlowLogFilterWithClientAddress
- 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
-