public static void localRunnerNotification ( JobConf conf , JobStatus status ) { JobEndStatusInfo notification = createNotification ( conf , status ) ; if ( notification != null ) { while ( notification . configureForRetry ( ) ) { try { int code = httpNotification ( notification . getUri ( ) ) ; if ( code != 200 ) { throw new IOException ( "Invalid response status code: " + code ) ; } else { break ; } } catch ( IOException ioex ) { LOG . error ( "Notification error [" + notification . getUri ( ) + "]" , ioex ) ; } catch ( Exception ex ) { LOG . error ( "Notification error [" + notification . getUri ( ) + "]" , ex ) ; } try { synchronized ( Thread . currentThread ( ) ) { Thread . currentThread ( ) . sleep ( notification . getRetryInterval ( ) ) ; } } catch ( InterruptedException iex ) { LOG . error ( "Notification retry error [" + notification + "]" , iex ) ; } } } }
simple synchronous way