public String systemStreamToStreamId(SystemStream systemStream) {
    List<String> streamIds = getStreamIdsForSystem(systemStream.getSystem()).stream()
      .filter(streamId -> systemStream.getStream().equals(getPhysicalName(streamId))).collect(Collectors.toList());
    if (streamIds.size() > 1) {
      throw new IllegalStateException(String.format("There was more than one stream found for system stream %s", systemStream));
    }

    return streamIds.isEmpty() ? null : streamIds.get(0);
  }
Finds the stream id which corresponds to the systemStream.
This finds the stream id that is mapped to the system in systemStream through the config and that has a physical
name (the physical name might be the stream id itself if there is no explicit mapping) that matches the stream in
systemStream.
Note: If the stream in the systemStream is a stream id which is mapped to a physical stream, then that stream won't
be returned as a stream id here, since the stream in systemStream doesn't match the physical stream name.

@param systemStream system stream to map to stream id
@return             stream id corresponding to the system stream
samza-core/src/main/java/org/apache/samza/config/StreamConfig.java