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

    https://github.com/apache/flink/pull/2363#discussion_r75343353
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/MetricRegistry.java
 ---
    @@ -144,6 +152,30 @@ public MetricRegistry(Configuration config) {
                }
        }
     
    +   /**
    +    * Initializes the MetricQueryService.
    +    * 
    +    * @param actorSystem ActorSystem to create the MetricQueryService on
    +     */
    +   public void startQueryService(ActorSystem actorSystem) {
    +           try {
    +                   queryService = 
MetricQueryService.startMetricQueryService(actorSystem);
    +           } catch (Exception e) {
    +                   LOG.warn("Could not start MetricDumpActor. No metrics 
will be submitted to the WebInterface.", e);
    +           }
    +   }
    +
    +   /**
    +    * Returns an ActorRef to the MetricQueryService
    +    * 
    +    * @return ActorRef to the MetricQueryService
    +     */
    +   public Option<ActorRef> getQueryService() {
    +           return queryService == null
    --- End diff --
    
    this is equivalent to `Option.apply(queryService)`. If queryService == 
null, then the apply call will return a `None`.


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