flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uce <...@git.apache.org>
Subject [GitHub] flink pull request #3460: [FLINK-1579] Implement History Server
Date Mon, 06 Mar 2017 15:25:18 GMT
Github user uce commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3460#discussion_r104436093
  
    --- 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)
    --- End diff --
    
    Can we use try with resources here?


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

Mime
View raw message