org.apache.hadoop.hbase.tool
Class Canary

java.lang.Object
  extended by 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.


Nested Class Summary
static interface Canary.ExtendedSink
           
static class Canary.Monitor
           
static class Canary.RegionServerStdOutSink
           
static interface Canary.Sink
           
static class Canary.StdOutSink
           
 
Constructor Summary
Canary()
           
Canary(ExecutorService executor, Canary.Sink sink)
           
 
Method Summary
 org.apache.hadoop.conf.Configuration getConf()
           
static void main(String[] args)
           
 Canary.Monitor newMonitor(HConnection connection, int index, String[] args)
          A Factory method for Canary.Monitor.
 int run(String[] args)
           
 void setConf(org.apache.hadoop.conf.Configuration conf)
           
static void sniff(HConnection connection, TableName tableName)
          Canary entry point for specified table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Canary

public Canary()

Canary

public Canary(ExecutorService executor,
              Canary.Sink sink)
Method Detail

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 target
args - 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.