public static void main ( final String [ ] args ) throws InjectionException { LOG . log ( Level . FINE , "Launching Unmanaged AM: {0}" , JAR_PATH ) ; try ( final DriverLauncher client = DriverLauncher . getLauncher ( RUNTIME_CONFIG ) ) { final String appId = client . submit ( DRIVER_CONFIG , 10000 ) ; LOG . log ( Level . INFO , "Job submitted: {0}" , appId ) ; final Configuration yarnAmConfig = UnmanagedAmYarnDriverConfiguration . CONF . set ( UnmanagedAmYarnDriverConfiguration . JOB_IDENTIFIER , appId ) . set ( UnmanagedAmYarnDriverConfiguration . JOB_SUBMISSION_DIRECTORY , DRIVER_ROOT_PATH ) . build ( ) ; try ( final REEFEnvironment reef = REEFEnvironment . fromConfiguration ( yarnAmConfig , DRIVER_CONFIG ) ) { reef . run ( ) ; final ReefServiceProtos . JobStatusProto status = reef . getLastStatus ( ) ; LOG . log ( Level . INFO , "REEF job {0} completed: state {1}" , new Object [ ] { appId , status . getState ( ) } ) ; } } ThreadLogger . logThreads ( LOG , Level . FINEST , "Threads running after DriverLauncher.close():" ) ; System . exit ( 0 ) ; // TODO[REEF-1715]: Should be able to exit cleanly at the end of main() }
Start Hello REEF job with Unmanaged Driver running locally in the same process .