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, 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
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 Runnable
run
in class Canary.Monitor
private String[] generateMonitorTables(String[] monitorTargets) throws IOException
IOException
private List<Future<Void>> sniff(Canary.RegionTask.TaskType taskType) throws Exception
Exception
private void checkWriteTableDistribution() throws IOException
IOException
private void createWriteTable(int numberOfServers) throws IOException
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.