@VisibleForTesting
  static String createProcessorId(ApplicationConfig appConfig) {
    if (StringUtils.isNotBlank(appConfig.getProcessorId())) {
      return appConfig.getProcessorId();
    } else if (StringUtils.isNotBlank(appConfig.getAppProcessorIdGeneratorClass())) {
      ProcessorIdGenerator idGenerator =
          ReflectionUtil.getObj(appConfig.getAppProcessorIdGeneratorClass(), ProcessorIdGenerator.class);
      return idGenerator.generateProcessorId(appConfig);
    } else {
      throw new ConfigException(String.format("Expected either %s or %s to be configured", ApplicationConfig.PROCESSOR_ID,
              ApplicationConfig.APP_PROCESSOR_ID_GENERATOR_CLASS));
    }
  }
Generates a unique logical identifier for the stream processor using the provided {@param appConfig}.
1. If the processorId is defined in the configuration, then returns the value defined in the configuration.
2. Else if the {@linkplain ProcessorIdGenerator} class is defined the configuration, then uses the {@linkplain ProcessorIdGenerator}
to generate the unique processorId.
3. Else throws the {@see ConfigException} back to the caller.
@param appConfig the configuration of the samza application.
@throws ConfigException if neither processor.id nor app.processor-id-generator.class is defined in the configuration.
@return the generated processor identifier.
samza-core/src/main/java/org/apache/samza/runtime/LocalApplicationRunner.java