private static class CanaryTool.RegionMonitor extends CanaryTool.Monitor
Modifier and Type | Field and Description |
---|---|
private int |
checkPeriod |
private HashMap<String,Long> |
configuredReadTableTimeouts
This is a timeout per table.
|
private long |
configuredWriteTableTimeout |
private static int |
DEFAULT_WRITE_DATA_TTL |
private static int |
DEFAULT_WRITE_TABLE_CHECK_PERIOD |
private long |
lastCheckTime |
private boolean |
rawScanEnabled |
private float |
regionsLowerLimit |
private float |
regionsUpperLimit |
private int |
writeDataTTL |
private boolean |
writeSniffing |
private TableName |
writeTableName |
admin, allowedFailures, connection, done, errorCode, executor, initialized, sink, targets, treatFailureAsError, useRegExp
Constructor and Description |
---|
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) |
Modifier and Type | Method and Description |
---|---|
private void |
checkWriteTableDistribution() |
private void |
createWriteTable(int numberOfServers) |
private String[] |
generateMonitorTables(String[] monitorTargets) |
private CanaryTool.RegionStdOutSink |
getSink() |
void |
run() |
private List<Future<Void>> |
sniff(CanaryTool.RegionTask.TaskType taskType,
CanaryTool.RegionStdOutSink regionSink) |
close, finalCheckForErrors, hasError, initAdmin, isDone
private static final int DEFAULT_WRITE_TABLE_CHECK_PERIOD
private static final int DEFAULT_WRITE_DATA_TTL
private long lastCheckTime
private boolean writeSniffing
private TableName writeTableName
private int writeDataTTL
private float regionsLowerLimit
private float regionsUpperLimit
private int checkPeriod
private boolean rawScanEnabled
private HashMap<String,Long> configuredReadTableTimeouts
private long configuredWriteTableTimeout
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)
private CanaryTool.RegionStdOutSink getSink()
public void run()
run
in interface Runnable
run
in class CanaryTool.Monitor
private String[] generateMonitorTables(String[] monitorTargets) throws IOException
IOException
private List<Future<Void>> sniff(CanaryTool.RegionTask.TaskType taskType, CanaryTool.RegionStdOutSink regionSink) throws Exception
Exception
private void checkWriteTableDistribution() throws IOException
IOException
private void createWriteTable(int numberOfServers) throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.