Class CompactionBench


  • public class CompactionBench
    extends Benchmark<alluxio.stress.client.CompactionTaskResult>
    Benchmark that simulates a workload that compacts many small files into a bigger file.
    • Field Detail

      • mPool

        protected java.util.concurrent.ExecutorService mPool
      • mParameters

        protected final alluxio.stress.client.CompactionParameters mParameters
      • mCachedFs

        protected alluxio.client.file.FileSystem[] mCachedFs
    • Constructor Detail

      • CompactionBench

        public CompactionBench()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
        Parameters:
        args - command-line arguments
      • getBenchDescription

        public java.lang.String getBenchDescription()
        Description copied from class: Benchmark
        Get the description of the bench.
        Specified by:
        getBenchDescription in class Benchmark<alluxio.stress.client.CompactionTaskResult>
        Returns:
        string of the bench description
      • runLocal

        public alluxio.stress.client.CompactionTaskResult runLocal()
                                                            throws java.lang.Exception
        Description copied from class: Benchmark
        Runs the test locally, in process.
        Specified by:
        runLocal in class Benchmark<alluxio.stress.client.CompactionTaskResult>
        Returns:
        the task result
        Throws:
        java.lang.Exception
      • prepare

        public void prepare()
                     throws java.lang.Exception
        Description copied from class: Benchmark
        Prepares to run the test.
        Specified by:
        prepare in class Benchmark<alluxio.stress.client.CompactionTaskResult>
        Throws:
        java.lang.Exception
      • cleanup

        public void cleanup()
                     throws java.lang.Exception
        Description copied from class: Benchmark
        Perform post-run cleanups.
        Overrides:
        cleanup in class Benchmark<alluxio.stress.client.CompactionTaskResult>
        Throws:
        java.lang.Exception
      • getPool

        public java.util.concurrent.ExecutorService getPool()
        If the thread pool is not yet initialized, creates the pool.
        Returns:
        the thread pool