Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-23433

Metrics cannot be initialized in format

    XMLWordPrintableJSON

    Details

      Description

       
      I want to use metrics in a custom format, I wrote it like this

      ProtobufRowDeserializationSchema implements DeserializationSchema<Row>{
      private transient MetricGroup metrics;
      @Override 
      public void open(InitializationContext context) throws Exception { 
      metrics = context.getMetricGroup(); 
       }
      }
      

      But, received an `metrics` NPE. it stands to reason that the metrics have already been initialized. 

       

      Jark Wu, Jingsong Lee , Looking forward to your reply.

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              liufangliang Fangliang Liu
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: