org.apache.hadoop.hbase.tool
Class Canary
java.lang.Object
org.apache.hadoop.hbase.tool.Canary
- All Implemented Interfaces:
- org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool
public final class Canary
- extends Object
- implements org.apache.hadoop.util.Tool
HBase Canary Tool, that that can be used to do
"canary monitoring" of a running HBase cluster.
Here are two modes
1. region mode - Foreach region tries to get one row per column family
and outputs some information about failure or latency.
2. regionserver mode - Foreach regionserver tries to get one row from one table
selected randomly and outputs some information about failure or latency.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Canary
public Canary()
Canary
public Canary(ExecutorService executor,
Canary.Sink sink)
getConf
public org.apache.hadoop.conf.Configuration getConf()
- Specified by:
getConf
in interface org.apache.hadoop.conf.Configurable
setConf
public void setConf(org.apache.hadoop.conf.Configuration conf)
- Specified by:
setConf
in interface org.apache.hadoop.conf.Configurable
run
public int run(String[] args)
throws Exception
- Specified by:
run
in interface org.apache.hadoop.util.Tool
- Throws:
Exception
newMonitor
public Canary.Monitor newMonitor(HConnection connection,
int index,
String[] args)
- A Factory method for
Canary.Monitor
.
Can be overridden by user.
- Parameters:
index
- a start index for monitor targetargs
- args passed from user
- Returns:
- a Monitor instance
sniff
public static void sniff(HConnection connection,
TableName tableName)
throws Exception
- Canary entry point for specified table.
- Throws:
Exception
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
Copyright © 2015 The Apache Software Foundation. All rights reserved.