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 #3444: [FLINK-5941] Integrate Archiver pattern into handl...
Date Thu, 02 Mar 2017 12:37:18 GMT
Github user uce commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3444#discussion_r103901870
  
    --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/WebRuntimeMonitor.java
---
    @@ -424,6 +425,33 @@ protected void initChannel(SocketChannel ch) {
     		LOG.info("Web frontend listening at " + address + ':' + port);
     	}
     
    +	public static Archiver[] getArchivers() {
    --- End diff --
    
    What do you think about making this "dynamic" and moving it to the handlers. This would
of course only work if this method is not static (which should not be a problem if the JobManager
does the archiving).
    
    The handlers implement an interface:
    
    ```java
    interface ArchivableJsonHandler {
    
      ArchivedJson[] createArchivedJsons(AccessExecutionGraph eg);
    
    }
    ```
    
    The router helpers that register the handlers (`GET()`, etc.) check:
    ```java
    if (handler instanceof ArchivableHandler) {
      archivable.add(handler.getJsonArchiver());
    }
    ```
    
    This methods then bcomes:
    ```java
    public Collection<ArchivableJsonHandler> getAchivableHanlders() {
      return archivable;
    }
    ```


---
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