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
FieldsModifier and TypeFieldDescriptionstatic final Stringprivate org.apache.hadoop.hbase.metrics.impl.FastLongHistogramprivate static final org.slf4j.Loggerprivate static final org.apache.hbase.thirdparty.org.apache.commons.cli.Optionsstatic final Stringstatic final intstatic final Stringstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcheckLag(org.apache.hadoop.hbase.client.Table table, int rlen, int vlen, int rows) private voidcreateTable(org.apache.hadoop.hbase.client.Admin admin, org.apache.hadoop.hbase.TableName tableName) private voidexec(org.apache.hadoop.hbase.TableName tableName, int rlen, int vlen, int rows) (package private) org.apache.hadoop.hbase.metrics.impl.FastLongHistogramstatic voidintMethods inherited from class org.apache.hadoop.conf.Configured
getConf, setConfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
runin 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
-