private static class Canary.RegionMonitor extends Canary.Monitor
| Modifier and Type | Field and Description |
|---|---|
private int |
checkPeriod |
private static int |
DEFAULT_WRITE_DATA_TTL |
private static int |
DEFAULT_WRITE_TABLE_CHECK_PERIOD |
private long |
lastCheckTime |
private float |
regionsLowerLimit |
private float |
regionsUpperLimit |
private int |
writeDataTTL |
private boolean |
writeSniffing |
private TableName |
writeTableName |
admin, connection, done, errorCode, executor, initialized, sink, targets, treatFailureAsError, useRegExp| Constructor and Description |
|---|
Canary.RegionMonitor(Connection connection,
String[] monitorTargets,
boolean useRegExp,
Canary.Sink sink,
ExecutorService executor,
boolean writeSniffing,
TableName writeTableName,
boolean treatFailureAsError) |
| Modifier and Type | Method and Description |
|---|---|
private void |
checkWriteTableDistribution() |
private void |
createWriteTable(int numberOfServers) |
private String[] |
generateMonitorTables(String[] monitorTargets) |
void |
run() |
private List<Future<Void>> |
sniff(Canary.RegionTask.TaskType taskType) |
close, finalCheckForErrors, hasError, initAdmin, isDoneprivate 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
public Canary.RegionMonitor(Connection connection, String[] monitorTargets, boolean useRegExp, Canary.Sink sink, ExecutorService executor, boolean writeSniffing, TableName writeTableName, boolean treatFailureAsError)
public void run()
run in interface Runnablerun in class Canary.Monitorprivate String[] generateMonitorTables(String[] monitorTargets) throws IOException
IOExceptionprivate List<Future<Void>> sniff(Canary.RegionTask.TaskType taskType) throws Exception
Exceptionprivate void checkWriteTableDistribution()
throws IOException
IOExceptionprivate void createWriteTable(int numberOfServers)
throws IOException
IOExceptionCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.