Class LocalAlluxioJobCluster


  • @NotThreadSafe
    public final class LocalAlluxioJobCluster
    extends java.lang.Object
    Local Alluxio job cluster. This cluster is should only be used in conjunction with an AbstractLocalAlluxioCluster.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getHostname()  
      alluxio.master.AlluxioJobMasterProcess getMaster()  
      alluxio.worker.JobWorkerProcess getWorker()  
      void restartWorker()
      Stops the current worker and starts a new one.
      void setProperty​(alluxio.conf.PropertyKey pk, java.lang.String value)
      Overrides properties for the Job Master and Worker before starting.
      void start()
      Starts both master and a worker using the configurations in test conf respectively.
      void stop()
      Stops the alluxio job service threads.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • start

        public void start()
                   throws java.io.IOException,
                          alluxio.exception.ConnectionFailedException
        Starts both master and a worker using the configurations in test conf respectively.
        Throws:
        java.io.IOException - if an I/O error occurs
        alluxio.exception.ConnectionFailedException - if network connection failed
      • stop

        public void stop()
                  throws java.lang.Exception
        Stops the alluxio job service threads.
        Throws:
        java.lang.Exception - when the operation fails
      • getMaster

        public alluxio.master.AlluxioJobMasterProcess getMaster()
        Returns:
        the job master
      • getWorker

        public alluxio.worker.JobWorkerProcess getWorker()
        Returns:
        the job worker
      • getHostname

        public java.lang.String getHostname()
        Returns:
        the hostname of the cluster
      • restartWorker

        public void restartWorker()
                           throws java.lang.Exception
        Stops the current worker and starts a new one.
        Throws:
        java.lang.Exception - if the the worker fails to stop or start
      • setProperty

        public void setProperty​(alluxio.conf.PropertyKey pk,
                                java.lang.String value)
        Overrides properties for the Job Master and Worker before starting.
        Parameters:
        pk - the property key to set
        value - the value to set for the key