You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by zjureel <gi...@git.apache.org> on 2017/07/12 08:48:36 UTC

[GitHub] flink pull request #4307: [FLINK-7100] TaskManager metrics are registered tw...

GitHub user zjureel opened a pull request:

    https://github.com/apache/flink/pull/4307

    [FLINK-7100] TaskManager metrics are registered twice

    Thanks for contributing to Apache Flink. Before you open your pull request, please take the following check list into consideration.
    If your changes take all of the items into account, feel free to open your pull request. For more information and/or questions please refer to the [How To Contribute guide](http://flink.apache.org/how-to-contribute.html).
    In addition to going through the list, please provide a meaningful description of your changes.
    
    - [ ] General
      - The pull request references the related JIRA issue ("[FLINK-XXX] Jira title text")
      - The pull request addresses only one issue
      - Each commit in the PR has a meaningful commit message (including the JIRA id)
    
    - [ ] Documentation
      - Documentation has been added for new functionality
      - Old documentation affected by the pull request has been updated
      - JavaDoc for public methods has been added
    
    - [ ] Tests & Build
      - Functionality added by the pull request is covered by tests
      - `mvn clean verify` has been executed successfully locally or a Travis build has passed


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zjureel/flink FLINK-7100

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/4307.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4307
    
----
commit 88d69b3fbf7ef0aca22de3785319037b3a6ebddb
Author: zjureel <zj...@gmail.com>
Date:   2017-07-12T08:25:24Z

    remove registration of metric when associate with JM

commit a4cd8c5dfd9fadf34e3ec82f8ffab731ebc156c9
Author: zjureel <zj...@gmail.com>
Date:   2017-07-12T08:33:46Z

    Use MetricUtils instead of TaskExecutorMetricsInitializer and remove TaskExecutorMetricsInitializer

----


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

[GitHub] flink pull request #4307: [FLINK-7100] TaskManager metrics are registered tw...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4307#discussion_r126919364
  
    --- Diff: flink-runtime/src/main/scala/org/apache/flink/runtime/taskmanager/TaskManager.scala ---
    @@ -983,12 +981,6 @@ class TaskManager(
           libraryCacheManager = Some(new FallbackLibraryCacheManager)
         }
         
    -    taskManagerMetricGroup = 
    --- End diff --
    
    you also have to remove accesses in `disassociateFromJobManager`


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

[GitHub] flink pull request #4307: [FLINK-7100] TaskManager metrics are registered tw...

Posted by zjureel <gi...@git.apache.org>.
Github user zjureel closed the pull request at:

    https://github.com/apache/flink/pull/4307


---

[GitHub] flink issue #4307: [FLINK-7100] TaskManager metrics are registered twice

Posted by dikei <gi...@git.apache.org>.
Github user dikei commented on the issue:

    https://github.com/apache/flink/pull/4307
  
    I think this commit broke the task manager page in the web ui for me. Can someone check it? 


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

[GitHub] flink pull request #4307: [FLINK-7100] TaskManager metrics are registered tw...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4307#discussion_r126919504
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/utils/TaskExecutorMetricsInitializer.java ---
    @@ -1,257 +0,0 @@
    -/*
    - * Licensed to the Apache Software Foundation (ASF) under one
    - * or more contributor license agreements.  See the NOTICE file
    - * distributed with this work for additional information
    - * regarding copyright ownership.  The ASF licenses this file
    - * to you under the Apache License, Version 2.0 (the
    - * "License"); you may not use this file except in compliance
    - * with the License.  You may obtain a copy of the License at
    - *
    - *     http://www.apache.org/licenses/LICENSE-2.0
    - *
    - * Unless required by applicable law or agreed to in writing, software
    - * distributed under the License is distributed on an "AS IS" BASIS,
    - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    - * See the License for the specific language governing permissions and
    - * limitations under the License.
    - */
    -
    -package org.apache.flink.runtime.taskexecutor.utils;
    -
    -import com.sun.management.OperatingSystemMXBean;
    -import org.apache.flink.metrics.Gauge;
    -import org.apache.flink.metrics.MetricGroup;
    -import org.apache.flink.runtime.io.network.NetworkEnvironment;
    -import org.apache.flink.runtime.taskexecutor.TaskExecutor;
    -import org.apache.flink.util.Preconditions;
    -import org.slf4j.Logger;
    -import org.slf4j.LoggerFactory;
    -
    -import javax.management.AttributeNotFoundException;
    -import javax.management.InstanceNotFoundException;
    -import javax.management.MBeanException;
    -import javax.management.MBeanServer;
    -import javax.management.MalformedObjectNameException;
    -import javax.management.ObjectName;
    -import javax.management.ReflectionException;
    -import java.lang.management.ClassLoadingMXBean;
    -import java.lang.management.GarbageCollectorMXBean;
    -import java.lang.management.ManagementFactory;
    -import java.lang.management.MemoryMXBean;
    -import java.lang.management.ThreadMXBean;
    -import java.util.List;
    -
    -/**
    - * Utility class ot initialize {@link TaskExecutor} specific metrics.
    - */
    -public class TaskExecutorMetricsInitializer {
    -	private static final Logger LOG = LoggerFactory.getLogger(TaskExecutorMetricsInitializer.class);
    -
    -	public static void instantiateStatusMetrics(
    --- End diff --
    
    The code here is a more cleaned up version of `MetricUtils`, so let's keep this one and just rename it. `MetricUtils` is a rather generic name anyway.


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

[GitHub] flink issue #4307: [FLINK-7100] TaskManager metrics are registered twice

Posted by zjureel <gi...@git.apache.org>.
Github user zjureel commented on the issue:

    https://github.com/apache/flink/pull/4307
  
    @zentol @aljoscha I have tried to fix this issue, please have a look when you are free, thanks


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

[GitHub] flink issue #4307: [FLINK-7100] TaskManager metrics are registered twice

Posted by zjureel <gi...@git.apache.org>.
Github user zjureel commented on the issue:

    https://github.com/apache/flink/pull/4307
  
    @zentol Thank you for your review, I have fix the problems you metioned as follows:
    1. rename `TaskExecutorMetricsInitializer` to `MetricUtils`
    2. move `taskManagerMetricGroup.close()` from `disassociateFromJobManager` to `postStop`, I think the it's neccessary to close `taskManagerMetricGroup` manually
    
    Please have another look when you are free, thanks


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