public static String createUniqueNameForBatch(String stream, Config config) {
    ApplicationConfig appConfig = new ApplicationConfig(config);
    if (appConfig.getAppMode() == ApplicationConfig.ApplicationMode.BATCH && appConfig.getRunId() != null) {
      return stream + "-" + appConfig.getRunId();
    } else {
      return stream;
    }
  }
Create a unique stream name if it's batch mode and has a valid run.id.
@param stream physical name of the stream
@param config {@link Config} object
@return stream name created
samza-core/src/main/java/org/apache/samza/execution/StreamManager.java