server/src/main/java/org/apache/druid/segment/loading/SegmentLocalCacheManager.java
/**
   * A helper method over {@link #loadInLocationWithStartMarker(DataSegment, File)} that catches the {@link SegmentLoadingException}
   * and emits alerts.
   * @param loc - {@link StorageLocation} where segment is to be downloaded in.
   * @param segment - {@link DataSegment} to download
   * @param storageDir - {@link File} pointing to segment directory
   * @param releaseLocation - Whether to release the location in case of failures
   * @return - True if segment was downloaded successfully, false otherwise.
   */
A helper method over  #loadInLocationWithStartMarker(DataSegment, File) that catches the  SegmentLoadingException
and emits alerts.
@param loc -  StorageLocation where segment is to be downloaded in.
@param segment -  DataSegment to download
@param storageDir -  File pointing to segment directory
@param releaseLocation - Whether to release the location in case of failures
@return - True if segment was downloaded successfully, false otherwise.
A helper method over #loadInLocationWithStartMarker ( DataSegment File ) that catches the SegmentLoadingException and emits alerts . @param loc - StorageLocation where segment is to be downloaded in . @param segment - DataSegment to download @param storageDir - File pointing to segment directory @param releaseLocation - Whether to release the location in case of failures @return - True if segment was downloaded successfully false otherwise .
private boolean loadInLocationWithStartMarkerQuietly(StorageLocation loc, DataSegment segment, File storageDir, boolean releaseLocation)
  {
    try {
      loadInLocationWithStartMarker(segment, storageDir);
      return true;
    }
    catch (SegmentLoadingException e) {
      try {
        log.makeAlert(
            e,
            "Failed to load segment in current location [%s], try next location if any",
            loc.getPath().getAbsolutePath()
        ).addData("location", loc.getPath().getAbsolutePath()).emit();
      }
      finally {
        if (releaseLocation) {
          loc.removeSegmentDir(storageDir, segment);
        }
        cleanupCacheFiles(loc.getPath(), storageDir);
      }
    }
    return false;
  }
private boolean loadInLocationWithStartMarkerQuietly ( StorageLocation loc , DataSegment segment , File storageDir , boolean releaseLocation ) { try { loadInLocationWithStartMarker ( segment , storageDir ) ; return true ; } catch ( SegmentLoadingException e ) { try { log . makeAlert ( e , "Failed to load segment in current location [%s], try next location if any" , loc . getPath ( ) . getAbsolutePath ( ) ) . addData ( "location" , loc . getPath ( ) . getAbsolutePath ( ) ) . emit ( ) ; } finally { if ( releaseLocation ) { loc . removeSegmentDir ( storageDir , segment ) ; } cleanupCacheFiles ( loc . getPath ( ) , storageDir ) ; } } return false ; }
A helper method over {@link #loadInLocationWithStartMarker(DataSegment, File)} that catches the {@link SegmentLoadingException}
 and emits alerts.
A helper method over { @link #loadInLocationWithStartMarker ( DataSegment File ) } that catches the { @link SegmentLoadingException } and emits alerts .