private JobSubmissionProtocol checkClient ( ) throws IOException { synchronized ( this ) { while ( client == null ) { try { if ( remoteJTStatus == RemoteJTStatus . FAILURE ) { throw new IOException ( "Remote Job Tracker is not available" ) ; } this . wait ( 1000 ) ; } catch ( InterruptedException e ) { throw new IOException ( e ) ; } } return client ; } }
Check if the RPC client to the remote job tracker is ready and wait if not .