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
@Private
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 org.apache.hadoop.hbase.regionserver.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 HBaseTestingUtility
private int
private final Set<org.apache.hadoop.hbase.wal.WAL>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
cleanRegionRootDir
(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path dir) private void
closeRegion
(org.apache.hadoop.hbase.regionserver.HRegion region) private static org.apache.hadoop.hbase.client.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 org.apache.hadoop.hbase.regionserver.HRegion
openRegion
(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path dir, org.apache.hadoop.hbase.client.TableDescriptor htd, org.apache.hadoop.hbase.wal.WALFactory wals, long whenToRoll, org.apache.hadoop.hbase.regionserver.LogRoller roller) private void
int
private long
runBenchmark
(Runnable[] runnable, int numThreads) void
setConf
(org.apache.hadoop.conf.Configuration conf) private org.apache.hadoop.hbase.client.Put
private long
verify
(org.apache.hadoop.hbase.wal.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
-
TEST_UTIL
-
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
private static org.apache.hadoop.hbase.client.TableDescriptor createHTableDescriptor(int regionNum, int numFamilies) -
verify
private long verify(org.apache.hadoop.hbase.wal.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 org.apache.hadoop.hbase.regionserver.HRegion openRegion(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path dir, org.apache.hadoop.hbase.client.TableDescriptor htd, org.apache.hadoop.hbase.wal.WALFactory wals, long whenToRoll, org.apache.hadoop.hbase.regionserver.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
-