rmatharu commented on a change in pull request #1021: Adding writing of
container.metadata file, and moving exception writing logic to
DiagnosticsManager
URL: https://github.com/apache/samza/pull/1021#discussion_r282159630
##########
File path:
samza-core/src/main/java/org/apache/samza/runtime/LocalContainerRunner.java
##########
@@ -65,13 +76,30 @@ public static void main(String[] args) throws Exception {
}
String jobName = jobConfig.getName().get();
String jobId = jobConfig.getJobId();
- MDC.put("containerName", "samza-container-" + containerId);
+ MDC.put("containerName", containerName);
MDC.put("jobName", jobName);
MDC.put("jobId", jobId);
+ writeMetadataFile(jobName, jobId, containerName,
System.getenv(ShellCommandConfig.ENV_EXECUTION_ENV_CONTAINER_ID()), config);
+
ApplicationDescriptorImpl<? extends ApplicationDescriptor> appDesc =
ApplicationDescriptorUtil.getAppDescriptor(ApplicationUtil.fromConfig(config),
config);
ContainerLaunchUtil.run(appDesc, containerId, jobModel);
}
+
+ public static void writeMetadataFile(String jobName, String jobId, String
containerName, String execEnvContainerId, Config config) throws Exception {
Review comment:
Its possible, but shouldnt be a common occurrence.
I can move this to a common place, and have the ClusterBasedJC also call it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services