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 SummaryNested ClassesModifier and TypeClassDescription(package private) classPerform WAL.append() of Put object, for the number of iterations requested.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final com.codahale.metrics.Meter(package private) static final Stringprivate intprivate final com.codahale.metrics.Histogramprivate static final org.slf4j.Loggerprivate final com.codahale.metrics.MetricRegistryprivate final org.apache.hadoop.hbase.regionserver.MultiVersionConcurrencyControlprivate int(package private) static final Stringprivate final com.codahale.metrics.Histogramprivate final com.codahale.metrics.Histogramprivate final com.codahale.metrics.Meter(package private) static final Stringprivate HBaseTestingUtilityprivate intprivate final Set<org.apache.hadoop.hbase.wal.WAL>
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprivate voidcleanRegionRootDir(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path dir) private voidcloseRegion(org.apache.hadoop.hbase.regionserver.HRegion region) private static org.apache.hadoop.hbase.client.TableDescriptorcreateHTableDescriptor(int regionNum, int numFamilies) (package private) static intThe guts of themain(java.lang.String[])method.private static voidlogBenchmarkResult(String testName, long numTests, long totalTime) static voidprivate org.apache.hadoop.hbase.regionserver.HRegionopenRegion(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 voidintprivate longrunBenchmark(Runnable[] runnable, int numThreads) voidsetConf(org.apache.hadoop.conf.Configuration conf) private org.apache.hadoop.hbase.client.Putprivate longverify(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.ConfiguredgetConfMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.conf.ConfigurablegetConf
- 
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- 
WALPerformanceEvaluationpublic WALPerformanceEvaluation()
 
- 
- 
Method Details- 
setConf- Specified by:
- setConfin interface- org.apache.hadoop.conf.Configurable
- Overrides:
- setConfin class- org.apache.hadoop.conf.Configured
 
- 
run- Specified by:
- runin interface- org.apache.hadoop.util.Tool
- Throws:
- Exception
 
- 
createHTableDescriptorprivate static org.apache.hadoop.hbase.client.TableDescriptor createHTableDescriptor(int regionNum, int numFamilies) 
- 
verifyprivate 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
- 
openRegionprivate 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
 
- 
cleanRegionRootDirprivate void cleanRegionRootDir(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path dir) throws IOException - Throws:
- IOException
 
- 
setupPut
- 
runBenchmark- Throws:
- InterruptedException
 
- 
innerMainThe guts of themain(java.lang.String[])method. Call this method to avoid themain(String[])System.exit.- Throws:
- Exception
 
- 
main- Throws:
- Exception
 
 
-