Package alluxio.stress.cli
Class StressMasterBenchBase<T extends alluxio.stress.master.MasterBenchTaskResultBase<P>,P extends alluxio.stress.master.MasterBenchBaseParameters>
- java.lang.Object
-
- alluxio.stress.cli.Benchmark<T>
-
- alluxio.stress.cli.AbstractStressBench<T,P>
-
- alluxio.stress.cli.StressMasterBenchBase<T,P>
-
- Type Parameters:
T- the type of task resultP- the type of task parameter
- Direct Known Subclasses:
MultiOperationStressMasterBench,StressMasterBench
public abstract class StressMasterBenchBase<T extends alluxio.stress.master.MasterBenchTaskResultBase<P>,P extends alluxio.stress.master.MasterBenchBaseParameters> extends AbstractStressBench<T,P>
The base class for master stress bench tests.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classStressMasterBenchBase.BenchContext-
Nested classes/interfaces inherited from class alluxio.stress.cli.Benchmark
Benchmark.MethodStatistics, Benchmark.ProfileInput
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.hadoop.fs.FileSystem[]mCachedFsCached FS instances.protected alluxio.client.file.FileSystem[]mCachedNativeFsIn case the Alluxio Native API is used, use the following instead.protected java.lang.StringmDirsDirprotected byte[]mFiledataprotected java.lang.StringmFilesDirprotected java.lang.StringmFixedDirprotected int[]mPathNodeIdsprotected int[]mTreeLevelNodeCountprotected intmTreeTotalNodeCount-
Fields inherited from class alluxio.stress.cli.AbstractStressBench
mParameters
-
Fields inherited from class alluxio.stress.cli.Benchmark
mBaseParameters
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedStressMasterBenchBase(P parameters)Creates instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidapplyNativeOperation(alluxio.client.file.FileSystem fs, alluxio.stress.master.Operation operation, long counter, org.apache.hadoop.fs.Path basePath, org.apache.hadoop.fs.Path fixedBasePath, int fixedCount)protected voiddeletePaths(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path basePath)protected java.lang.StringextractHostName(java.lang.String mId)protected abstract java.util.concurrent.Callable<java.lang.Void>getBenchThread(StressMasterBenchBase.BenchContext context, int index)protected abstract StressMasterBenchBase.BenchContextgetContext()TrunLocal()Runs the test locally, in process.-
Methods inherited from class alluxio.stress.cli.AbstractStressBench
run, validateParams
-
Methods inherited from class alluxio.stress.cli.Benchmark
cleanup, generateJobConfig, getBenchDescription, mainInternal, parseParameters, prepare, processMethodProfiles, runSingleTask
-
-
-
-
Field Detail
-
mFiledata
protected byte[] mFiledata
-
mCachedFs
protected org.apache.hadoop.fs.FileSystem[] mCachedFs
Cached FS instances.
-
mCachedNativeFs
protected alluxio.client.file.FileSystem[] mCachedNativeFs
In case the Alluxio Native API is used, use the following instead.
-
mDirsDir
protected final java.lang.String mDirsDir
- See Also:
- Constant Field Values
-
mFilesDir
protected final java.lang.String mFilesDir
- See Also:
- Constant Field Values
-
mFixedDir
protected final java.lang.String mFixedDir
- See Also:
- Constant Field Values
-
mPathNodeIds
protected int[] mPathNodeIds
-
mTreeLevelNodeCount
protected int[] mTreeLevelNodeCount
-
mTreeTotalNodeCount
protected int mTreeTotalNodeCount
-
-
Constructor Detail
-
StressMasterBenchBase
protected StressMasterBenchBase(P parameters)
Creates instance.
-
-
Method Detail
-
getContext
protected abstract StressMasterBenchBase.BenchContext getContext() throws java.io.IOException, alluxio.exception.AlluxioException
- Throws:
java.io.IOExceptionalluxio.exception.AlluxioException
-
deletePaths
protected void deletePaths(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path basePath) throws java.lang.Exception- Throws:
java.lang.Exception
-
runLocal
public T runLocal() throws java.lang.Exception
Description copied from class:BenchmarkRuns the test locally, in process.
-
getBenchThread
protected abstract java.util.concurrent.Callable<java.lang.Void> getBenchThread(StressMasterBenchBase.BenchContext context, int index)
-
applyNativeOperation
protected void applyNativeOperation(alluxio.client.file.FileSystem fs, alluxio.stress.master.Operation operation, long counter, org.apache.hadoop.fs.Path basePath, org.apache.hadoop.fs.Path fixedBasePath, int fixedCount) throws java.io.IOException, alluxio.exception.AlluxioException- Throws:
java.io.IOExceptionalluxio.exception.AlluxioException
-
extractHostName
protected java.lang.String extractHostName(java.lang.String mId)
-
-