Package org.apache.hadoop.hbase
Class RegionReplicationLagEvaluation
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.hbase.RegionReplicationLagEvaluation
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
,org.apache.hadoop.util.Tool
@Private
public class RegionReplicationLagEvaluation
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
A tool to evaluating the lag between primary replica and secondary replica.
It simply adds a row to the primary replica, and then check how long before we can read it from
the secondary replica.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
private org.apache.hadoop.hbase.metrics.impl.FastLongHistogram
private static final org.slf4j.Logger
private static final org.apache.hbase.thirdparty.org.apache.commons.cli.Options
static final String
static final int
static final String
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
checkLag
(org.apache.hadoop.hbase.client.Table table, int rlen, int vlen, int rows) private void
createTable
(org.apache.hadoop.hbase.client.Admin admin, org.apache.hadoop.hbase.TableName tableName) private void
exec
(org.apache.hadoop.hbase.TableName tableName, int rlen, int vlen, int rows) (package private) org.apache.hadoop.hbase.metrics.impl.FastLongHistogram
static void
int
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
-
Field Details
-
LOG
-
TABLE_NAME
- See Also:
-
FAMILY_NAME
- See Also:
-
QUALIFIER_NAME
- See Also:
-
VALUE_LENGTH
- See Also:
-
ROW_LENGTH
- See Also:
-
OPTIONS
-
histogram
-
-
Constructor Details
-
RegionReplicationLagEvaluation
public RegionReplicationLagEvaluation()
-
-
Method Details
-
getHistogram
org.apache.hadoop.hbase.metrics.impl.FastLongHistogram getHistogram() -
run
- Specified by:
run
in interfaceorg.apache.hadoop.util.Tool
- Throws:
Exception
-
createTable
private void createTable(org.apache.hadoop.hbase.client.Admin admin, org.apache.hadoop.hbase.TableName tableName) throws IOException - Throws:
IOException
-
checkLag
private void checkLag(org.apache.hadoop.hbase.client.Table table, int rlen, int vlen, int rows) throws IOException - Throws:
IOException
-
exec
private void exec(org.apache.hadoop.hbase.TableName tableName, int rlen, int vlen, int rows) throws IOException - Throws:
IOException
-
main
- Throws:
Exception
-