public final T makeCall ( ) throws IOException { while ( true ) { try { return call ( ) ; } catch ( ConnectException e ) { // We fall back only after ConnectException try { // Fall back to secondary tracker and reconnect to new JT reconnectToNewJobTracker ( 0 ) ; } catch ( IOException f ) { LOG . error ( "Fallback process failed with " , f ) ; // Re-throw original exception throw e ; } } catch ( IOException e ) { // the subclass of fallback caller should provide // logic here. We will retry in most cases handleIOException ( e ) ; } } }
Template function to make the call . Throws if can not fallback .