Package org.apache.hadoop.hbase.tool
Class CanaryTool.RegionMonitor
java.lang.Object
org.apache.hadoop.hbase.tool.CanaryTool.Monitor
org.apache.hadoop.hbase.tool.CanaryTool.RegionMonitor
- All Implemented Interfaces:
Closeable,AutoCloseable,Runnable
- Enclosing class:
- CanaryTool
A monitor for region mode.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intThis is a timeout per table.private longprivate static final intprivate static final intprivate longprivate booleanprivate booleanprivate floatprivate floatprivate intprivate booleanprivate TableNameFields inherited from class org.apache.hadoop.hbase.tool.CanaryTool.Monitor
admin, allowedFailures, connection, done, errorCode, executor, initialized, sink, targets, treatFailureAsError, useRegExp -
Constructor Summary
ConstructorsConstructorDescriptionRegionMonitor(Connection connection, String[] monitorTargets, boolean useRegExp, CanaryTool.Sink sink, ExecutorService executor, boolean writeSniffing, TableName writeTableName, boolean treatFailureAsError, HashMap<String, Long> configuredReadTableTimeouts, long configuredWriteTableTimeout, long allowedFailures) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate voidcreateWriteTable(int numberOfServers) private String[]generateMonitorTables(String[] monitorTargets) Returns List of tables to use in test.private CanaryTool.RegionStdOutSinkgetSink()voidrun()sniff(CanaryTool.RegionTask.TaskType taskType, CanaryTool.RegionStdOutSink regionSink) Methods inherited from class org.apache.hadoop.hbase.tool.CanaryTool.Monitor
close, finalCheckForErrors, hasError, initAdmin, isDone
-
Field Details
-
DEFAULT_WRITE_TABLE_CHECK_PERIOD
- See Also:
-
DEFAULT_WRITE_DATA_TTL
- See Also:
-
lastCheckTime
-
writeSniffing
-
writeTableName
-
writeDataTTL
-
regionsLowerLimit
-
regionsUpperLimit
-
checkPeriod
-
rawScanEnabled
-
readAllCF
-
configuredReadTableTimeouts
This is a timeout per table. If read of each region in the table aggregated takes longer than what is configured here, we log an ERROR rather than just an INFO. -
configuredWriteTableTimeout
-
-
Constructor Details
-
RegionMonitor
public RegionMonitor(Connection connection, String[] monitorTargets, boolean useRegExp, CanaryTool.Sink sink, ExecutorService executor, boolean writeSniffing, TableName writeTableName, boolean treatFailureAsError, HashMap<String, Long> configuredReadTableTimeouts, long configuredWriteTableTimeout, long allowedFailures)
-
-
Method Details
-
getSink
-
run
- Specified by:
runin interfaceRunnable- Specified by:
runin classCanaryTool.Monitor
-
generateMonitorTables
Returns List of tables to use in test.- Throws:
IOException
-
sniff
private List<Future<Void>> sniff(CanaryTool.RegionTask.TaskType taskType, CanaryTool.RegionStdOutSink regionSink) throws Exception - Throws:
Exception
-
checkWriteTableDistribution
- Throws:
IOException
-
createWriteTable
- Throws:
IOException
-