code: private void startMaster() throws IOException, ConnectionFailedException {
      mMaster = AlluxioJobMasterProcess.Factory.create();
  
      ServerConfiguration
          .set(PropertyKey.JOB_MASTER_RPC_PORT, String.valueOf(mMaster.getRpcAddress().getPort()));
      Runnable runMaster = new Runnable() {
        @Override
        public void run() {
          try {
            mMaster.start();
          } catch (Exception e) {
            throw new RuntimeException(e + " \n Start Master Error \n" + e.getMessage(), e);
          }
        }
      };
      mMasterThread = new Thread(runMaster);
      mMasterThread.start();
    }
docs: Runs a master.
  
  @throws IOException if an I/O error occurs
  @throws ConnectionFailedException if network connection failed