public void processFailure ( QueryBatchException queryBatch ) { boolean isHostUnavailableException = processException ( queryBatch . getBatcher ( ) , queryBatch , queryBatch . getClient ( ) . getHost ( ) ) ; if ( isHostUnavailableException == true ) { try { logger . warn ( "Retrying failed batch: {}, results so far: {}, forest: {}, forestBatch: {}, forest results so far: {}" , queryBatch . getJobBatchNumber ( ) , queryBatch . getJobResultsSoFar ( ) , queryBatch . getForest ( ) . getForestName ( ) , queryBatch . getForestBatchNumber ( ) , queryBatch . getForestResultsSoFar ( ) ) ; queryBatch . getBatcher ( ) . retryWithFailureListeners ( queryBatch ) ; } catch ( RuntimeException e ) { logger . error ( "Exception during retry" , e ) ; processFailure ( new QueryBatchException ( queryBatch , e ) ) ; } } }
This implements the QueryFailureListener interface