Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/2206#discussion_r69716824
--- Diff:
flink-streaming-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/metrics/AvgKafkaMetricAccumulator.java
---
@@ -127,12 +127,17 @@ private static AvgSumCount getAvgSumCount(Avg avg) {
}
private void writeObject(ObjectOutputStream out) throws IOException {
- Measurable thisMeasurable =
DefaultKafkaMetricAccumulator.getMeasurableFromKafkaMetric(this.kafkaMetric);
- if(!(thisMeasurable instanceof Avg) ) {
- throw new RuntimeException("Must be of type Avg");
+ try {
+ Measurable thisMeasurable =
DefaultKafkaMetricAccumulator.getMeasurableFromKafkaMetric(this.kafkaMetric);
+ if(!(thisMeasurable instanceof Avg) ) {
+ throw new RuntimeException("Must be of type
Avg");
+ }
+ this.lastSumCount = getAvgSumCount((Avg)
thisMeasurable);
+ out.defaultWriteObject();
+ } catch(Exception e) {
+ // lol non-fatal error.
--- End diff --
lol?
---
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.
---