Github user uce commented on a diff in the pull request:
https://github.com/apache/flink/pull/3460#discussion_r105907455
--- Diff:
flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/MemoryArchivist.scala
---
@@ -183,6 +198,45 @@ class MemoryArchivist(private val max_entries: Int)
}
}
+ private def archiveJsonFiles(graph: ArchivedExecutionGraph) {
+ future {
+ try {
+ val rootPath = new Path(flinkConfiguration.getString(
+ JobManagerOptions.ARCHIVE_DIR))
+ val fs = rootPath.getFileSystem
+ val path = new Path(rootPath, s"${graph.getJobID.toString}")
+ val out = fs.create(path, WriteMode.NO_OVERWRITE)
+
+ try {
+ val gen = jacksonFactory.createGenerator(out, JsonEncoding.UTF8)
+ try {
+ gen.writeStartObject()
+ gen.writeArrayFieldStart(ArchivedJson.ARCHIVE)
+ for (archiver <- WebMonitorUtils.getJsonArchivists) {
+ for (archive <- archiver.archiveJsonWithPath(graph).asScala)
{
+ gen.writeStartObject()
+ gen.writeStringField(ArchivedJson.PATH, archive.getPath)
+ gen.writeStringField(ArchivedJson.JSON, archive.getJson)
+ gen.writeEndObject()
+ }
+ }
+ gen.writeEndArray()
+ gen.writeEndObject()
--- End diff --
Should we add a log message that the job has been archived in the path XYZ?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---