boolean initializeStream(StreamSpec streamSpec) {
    LOG.info("Initializing the stream for {}", streamSpec.getId());
    systemStreamToPartitions.put(streamSpec.toSystemStream(), streamSpec.getPartitionCount());

    for (int partition = 0; partition < streamSpec.getPartitionCount(); partition++) {
      bufferedMessages.put(
          new SystemStreamPartition(streamSpec.toSystemStream(), new Partition(partition)),
          newSynchronizedLinkedList());
    }

    return true;
  }
Populate the metadata for the {@link SystemStream} and initialize the buffer for {@link SystemStreamPartition}.

@param streamSpec stream spec for the stream to be initialized

@return true if successful, false otherwise
samza-core/src/main/java/org/apache/samza/system/inmemory/InMemoryManager.java