Source:
<code>private void createStreams(String planId, List<StreamSpec> intStreams, StreamManager streamManager) { if (intStreams.isEmpty()) { LOG.info("Set of intermediate streams is empty. Nothing to create."); return; } LOG.info("A single processor must create the intermediate streams. Processor will attempt to acquire the lock.", uid); if(coordinationUtils == null) { JobCoordinatorConfig jcConfig = new JobCoordinatorConfig(appDesc.getConfig()); <START> String coordinationId = new ApplicationConfig(appDesc.getConfig()).getGlobalAppId() + CoordinationConstants.APPLICATION_RUNNER_PATH_SUFFIX; <END> coordinationUtils = jcConfig.getCoordinationUtilsFactory().getCoordinationUtils(coordinationId, uid, appDesc.getConfig()); } if (coordinationUtils == null) { LOG.warn("Processor failed to create utils. Each processor will attempt to create streams.", uid); streamManager.createStreams(intStreams); return; } Boolean isAppModeBatch = new ApplicationConfig(userConfig).getAppMode() == ApplicationConfig.ApplicationMode.BATCH; String lockId = planId; if(isAppModeBatch && runId != null) { lockId = runId; } DistributedLockWithState lockWithState = coordinationUtils.getLockWithState(lockId); try { if (lockWithState.lockIfNotSet(1000, TimeUnit.MILLISECONDS)) { LOG.info("lock acquired for streams creation by " + uid); streamManager.createStreams(intStreams); lockWithState.unlockAndSet(); } else { LOG.info("Processor did not obtain the lock for streams creation. They must've been created by another processor.", uid); } } catch (TimeoutException e) { String msg = String.format("Processor failed to get the lock for stream initialization", uid); throw new SamzaException(msg, e); } finally { if(!isAppModeBatch && coordinationUtils != null) { coordinationUtils.close(); coordinationUtils = null; } } }</code><technical_language>sounds coordinationId is constructed is Zk specific i.e. <app_id>/ApplicationRunnerData. rename coordinationId more general namespace leave namespace interpreted in implementers want to? / part of application runner path suffix right here. Additionally, this align namespacing for metadata work</technical_language>

Target:
private void createStreams(String planId, List<StreamSpec> intStreams, StreamManager streamManager) { if (intStreams.isEmpty()) { LOG.info("Set of intermediate streams is empty. Nothing to create."); return; } LOG.info("A single processor must create the intermediate streams. Processor will attempt to acquire the lock.", processorId); if (coordinationUtils == null) { LOG.warn("Processor failed to create utils. Each processor will attempt to create streams.", processorId); streamManager.createStreams(intStreams); return; } boolean isAppModeBatch = new ApplicationConfig(userConfig).getAppMode() == ApplicationConfig.ApplicationMode.BATCH; String lockId = planId; if (isAppModeBatch && runId != null) { lockId = runId; } try { checkAndCreateStreams(lockId, intStreams, streamManager); } catch (TimeoutException te) { throw new SamzaException(String.format("Processor failed to get the lock for stream initialization within timeout.", processorId), te); } finally { if (!isAppModeBatch && coordinationUtils != null) { coordinationUtils.close(); } } }