You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by GitBox <gi...@apache.org> on 2019/05/06 21:32:38 UTC
[GitHub] [samza] mynameborat commented on a change in pull request #1021:
Adding writing of container.metadata file,
and moving exception writing logic to DiagnosticsManager
mynameborat 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_r281371322
##########
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:
I suppose we need this logic in AM as well to react to OOM in the application master.
Would it be possible to have AM detect that container OOM'd in which case, we have this logic in one place and have the AM react for container/AM OOMing?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services