Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3460#discussion_r104640647
  
    --- Diff: 
flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/MemoryArchivist.scala
 ---
    @@ -183,6 +193,33 @@ class MemoryArchivist(private val max_entries: Int)
         }
       }
     
    +  private def archiveJsonFiles(graph: ArchivedExecutionGraph) {
    +    future {
    +      val rootPath = new Path(flinkConfiguration.getString(
    +        JobManagerOptions.ARCHIVE_DIR))
    +      val fs = rootPath.getFileSystem
    +      val tmpArchivePath = new Path(rootPath, 
s"tmp_${graph.getJobID.toString}")
    +      for (archiver <- WebMonitorUtils.getArchivers) {
    +        try {
    +          for (archive <- archiver.archiveJsonWithPath(graph).asScala) {
    +            val targetPath =
    +              new Path(tmpArchivePath, s"${archive.getPath}.json")
    +            val out = fs.create(targetPath, false)
    +            out.write(archive.getJson.getBytes(StandardCharsets.UTF_8))
    +            out.close()
    +          }
    +        } catch {
    +          case ioe: IOException => {
    +            log.error("Failed to archive job details.", ioe)
    +          }
    +        }
    +      }
    +      if (!fs.rename(tmpArchivePath, new Path(rootPath, 
s"${graph.getJobID.toString}"))) {
    --- End diff --
    
    yes. Once we write out 1 file this should no longer be an issue.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to