Fangliang Liu created FLINK-23433:
-------------------------------------
Summary: Metrics cannot be initialized in format
Key: FLINK-23433
URL: https://issues.apache.org/jira/browse/FLINK-23433
Project: Flink
Issue Type: Bug
Components: Formats (JSON, Avro, Parquet, ORC, SequenceFile)
Affects Versions: 1.11.3
Reporter: Fangliang Liu
I want to use metrics in a custom format, I wrote it like this
{code:java}
ProtobufRowDeserializationSchema implements DeserializationSchema<Row>{
private transient MetricGroup metrics;
@Override
public void open(InitializationContext context) throws Exception {
metrics = context.getMetricGroup();
}
}
{code}
But, received an `metrics` NPE. it stands to reason that the metrics have
already been initialized.
[~jark], [~lzljs3620320] , Looking forward to your reply.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)