code: private void loadSegment(DataSegment segment, DataSegmentChangeCallback callback) throws SegmentLoadingException
    {
      final boolean loaded;
      try {
        loaded = segmentManager.loadSegment(segment);
      }
      catch (Exception e) {
        removeSegment(segment, callback, false);
        throw new SegmentLoadingException(e, "Exception loading segment[%s]", segment.getId());
      }
  
      if (loaded) {
        File segmentInfoCacheFile = new File(config.getInfoDir(), segment.getId().toString());
        if (!segmentInfoCacheFile.exists()) {
          try {
            jsonMapper.writeValue(segmentInfoCacheFile, segment);
          }
          catch (IOException e) {
            removeSegment(segment, callback, false);
            throw new SegmentLoadingException(
                e,
                "Failed to write to disk segment info cache file[%s]",
                segmentInfoCacheFile
            );
          }
        }
      }
    }
docs: Load a single segment. If the segment is loaded successfully, this function simply returns. Otherwise it will
  throw a SegmentLoadingException
  
  @throws SegmentLoadingException if it fails to load the given segment