protected void startSchedulerDriver ( ) { // start the driver non-blocking, // since we need to set heron state after the scheduler driver is started. // Heron will block the main thread eventually driver . start ( ) ; // Staging the Mesos Framework LOG . info ( "Waiting for Mesos Framework get registered" ) ; long timeout = MesosContext . getHeronMesosFrameworkStagingTimeoutMs ( config ) ; if ( ! mesosFramework . waitForRegistered ( timeout , TimeUnit . MILLISECONDS ) ) { throw new RuntimeException ( "Failed to register with Mesos Master in time" ) ; } }
Start the scheduler driver and wait it to get registered