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
Modifier and TypeFieldDescriptionprivate int
This is a timeout per table.private long
private static final int
private static final int
private long
private boolean
private boolean
private float
private float
private int
private boolean
private TableName
Fields inherited from class org.apache.hadoop.hbase.tool.CanaryTool.Monitor
admin, allowedFailures, connection, done, errorCode, executor, initialized, sink, targets, treatFailureAsError, useRegExp
-
Constructor Summary
ConstructorDescriptionRegionMonitor
(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 void
private void
createWriteTable
(int numberOfServers) private String[]
generateMonitorTables
(String[] monitorTargets) Returns List of tables to use in test.private CanaryTool.RegionStdOutSink
getSink()
void
run()
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:
run
in interfaceRunnable
- Specified by:
run
in 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
-