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
Nested ClassesModifier and TypeClassDescription(package private) classPerform WAL.append() of Put object, for the number of iterations requested. -
Field Summary
FieldsModifier 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 Summary
Constructors -
Method Summary
Modifier 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.Configured
getConfMethods 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
-
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:
setConfin interfaceorg.apache.hadoop.conf.Configurable- Overrides:
setConfin classorg.apache.hadoop.conf.Configured
-
run
- Specified by:
runin 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
-