private List<FileInfo> getLogSegments(boolean includeActiveLogSegment) {
    return log.getAllLogSegmentNames().stream()
        .filter(segmentName -> includeActiveLogSegment || !segmentName.equals(log.getActiveSegment().getName()))
        .map(segmentName -> log.getSegment(segmentName))
        .map(segment -> {
          FileInfo storeFileInfo = new StoreFileInfo(segment.getName().toString(), segment.getView().getFirst().length());
          segment.closeView();
          return storeFileInfo;
        })
        .collect(Collectors.toList());
  }
Get all log segments in the store.
The list of files returned are sorted by their logSegmentNames
Param includeActiveLogSegment is used to determine if the active log segment should be included in the result.
ambry-store/src/main/java/com/github/ambry/store/BlobStore.java