private void cleanup() {
    runIdGenerator.ifPresent(RunIdGenerator::close);
    coordinationUtils.ifPresent(CoordinationUtils::close);
  }
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