public void notifyFailed(Throwable exception) throws CarbonSortKeyAndGroupByException {
  dataSorterAndWriterExecutorService.shutdownNow();
  executorService.shutdownNow();
  observer.setFailed(true);
  LOGGER.error(exception);
  throw new CarbonSortKeyAndGroupByException(exception);
}

public void notifyFailed ( Throwable exception ) throws CarbonSortKeyAndGroupByException { dataSorterAndWriterExecutorService . shutdownNow ( ) ; executorService . shutdownNow ( ) ; observer . setFailed ( true ) ; LOGGER . error ( exception ) ; throw new CarbonSortKeyAndGroupByException ( exception ) ; }
below method will be called if any thread fails during execution
