static LogSegmentName fromFilename(String filename) {
    if (filename.equals(SINGLE_SEGMENT_LOG_FILE_NAME)) {
      return SINGLE_SEGMENT_LOG_NAME;
    }
    if (!filename.endsWith(SUFFIX)) {
      throw new IllegalArgumentException("The filename of the log segment does not end with [" + SUFFIX + "]");
    }
    String name = filename.substring(0, filename.length() - SUFFIX.length());
    return new LogSegmentName(name);
  }
@param filename the name of the file that backs the log segment.
@return the {@link LogSegmentName}.
ambry-store/src/main/java/com/github/ambry/store/LogSegmentName.java