Package org.apache.hadoop.hbase.wal
Class WALPerformanceEvaluation
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.hbase.wal.WALPerformanceEvaluation
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
,org.apache.hadoop.util.Tool
@LimitedPrivate("Tools")
public final class WALPerformanceEvaluation
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
This class runs performance benchmarks for
WAL
. See usage for this tool by running:
$ hbase org.apache.hadoop.hbase.wal.WALPerformanceEvaluation -h
-
Nested Class Summary
Modifier and TypeClassDescription(package private) class
Perform WAL.append() of Put object, for the number of iterations requested. -
Field Summary
Modifier and TypeFieldDescriptionprivate final com.codahale.metrics.Meter
(package private) static final String
private int
private final com.codahale.metrics.Histogram
private static final org.slf4j.Logger
private final com.codahale.metrics.MetricRegistry
private final MultiVersionConcurrencyControl
private int
(package private) static final String
private final com.codahale.metrics.Histogram
private final com.codahale.metrics.Histogram
private final com.codahale.metrics.Meter
(package private) static final String
private int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
cleanRegionRootDir
(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path dir) private void
closeRegion
(HRegion region) private static TableDescriptor
createHTableDescriptor
(int regionNum, int numFamilies) (package private) static int
The guts of themain(java.lang.String[])
method.private static void
logBenchmarkResult
(String testName, long numTests, long totalTime) static void
private HRegion
openRegion
(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path dir, TableDescriptor htd, WALFactory wals, long whenToRoll, LogRoller roller) private void
int
private long
runBenchmark
(Runnable[] runnable, int numThreads) void
setConf
(org.apache.hadoop.conf.Configuration conf) private Put
private long
verify
(WALFactory wals, org.apache.hadoop.fs.Path wal, boolean verbose) Verify the content of the WAL file.Methods inherited from class org.apache.hadoop.conf.Configured
getConf
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
-
Field Details
-
LOG
-
metrics
-
syncMeter
-
syncHistogram
-
syncCountHistogram
-
appendMeter
-
latencyHistogram
-
mvcc
-
TABLE_NAME
- See Also:
-
QUALIFIER_PREFIX
- See Also:
-
FAMILY_PREFIX
- See Also:
-
numQualifiers
-
valueSize
-
keySize
-
walsListenedTo
-
-
Constructor Details
-
WALPerformanceEvaluation
public WALPerformanceEvaluation()
-
-
Method Details
-
setConf
- Specified by:
setConf
in interfaceorg.apache.hadoop.conf.Configurable
- Overrides:
setConf
in classorg.apache.hadoop.conf.Configured
-
run
- Specified by:
run
in interfaceorg.apache.hadoop.util.Tool
- Throws:
Exception
-
createHTableDescriptor
-
verify
private long verify(WALFactory wals, org.apache.hadoop.fs.Path wal, boolean verbose) throws IOException Verify the content of the WAL file. Verify that the file has expected number of edits.- Parameters:
wals
- may not be null- Returns:
- Count of edits.
- Throws:
IOException
-
logBenchmarkResult
-
printUsageAndExit
-
openRegion
private HRegion openRegion(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path dir, TableDescriptor htd, WALFactory wals, long whenToRoll, LogRoller roller) throws IOException - Throws:
IOException
-
closeRegion
- Throws:
IOException
-
cleanRegionRootDir
private void cleanRegionRootDir(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path dir) throws IOException - Throws:
IOException
-
setupPut
-
runBenchmark
- Throws:
InterruptedException
-
innerMain
The guts of themain(java.lang.String[])
method. Call this method to avoid themain(String[])
System.exit.- Throws:
Exception
-
main
- Throws:
Exception
-