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

    https://github.com/apache/flink/pull/2386#discussion_r77996545
  
    --- Diff: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/AbstractStreamOperator.java
 ---
    @@ -94,20 +102,38 @@
        /** Backend for keyed state. This might be empty if we're not on a 
keyed stream. */
        private transient KeyedStateBackend<?> keyedStateBackend;
     
    -   protected transient MetricGroup metrics;
    +   // --------------- Metrics ---------------------------
    +
    +   /** Metric group for the operator */
    +   protected MetricGroup metrics;
    +
    +   /** Flag indicating if this operator is a sink */
    +   protected transient boolean isSink = false;
    +
    +   protected LatencyGauge latencyGauge;
    +
     
        // 
------------------------------------------------------------------------
        //  Life Cycle
        // 
------------------------------------------------------------------------
     
        @Override
    -   public void setup(StreamTask<?, ?> containingTask, StreamConfig config, 
Output<StreamRecord<OUT>> output) {
    +   public void setup(StreamTask<?, ?> containingTask, StreamConfig config, 
Output<StreamRecord<OUT>> output, boolean isSink) {
                this.container = containingTask;
                this.config = config;
                String operatorName = 
containingTask.getEnvironment().getTaskInfo().getTaskName().split("->")[config.getChainIndex()].trim();
                
                this.metrics = 
container.getEnvironment().getMetricGroup().addOperator(operatorName);
                this.output = new CountingOutput(output, 
this.metrics.counter("numRecordsOut"));
    +           this.isSink = isSink;
    +           Configuration taskManagerConfig = 
container.getEnvironment().getTaskManagerInfo().getConfiguration();
    +           int historySize = 
taskManagerConfig.getInteger(ConfigConstants.METRICS_LATENCY_HISTORY_SIZE, 
ConfigConstants.DEFAULT_METRICS_LATENCY_HISTORY_SIZE);
    +           if(historySize <= 0) {
    --- End diff --
    
    missing space after if


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to