@Override protected void createMetrics() { super.createMetrics(); }
@Override protected void createMetrics() { super.createMetrics(); this.messageParseFailures = this.getMetricContext().meter( RuntimeMetrics.GOBBLIN_JOB_MONITOR_KAFKA_MESSAGE_PARSE_FAILURES); }
@Override public Collection<Either<JobSpec, URI>> parseJobSpec(byte[] message) throws IOException { InputStream is = new ByteArrayInputStream(message); this.versionWriter.readSchemaVersioningInformation(new DataInputStream(is)); Decoder decoder = DecoderFactory.get().binaryDecoder(is, this.decoder.get()); try { T decodedMessage = this.reader.get().read(null, decoder); return parseJobSpec(decodedMessage); } catch (AvroRuntimeException | IOException exc) { this.messageParseFailures.mark(); if (this.messageParseFailures.getFiveMinuteRate() < 1) { log.warn("Unable to decode input message.", exc); } else { log.warn("Unable to decode input message."); } return Lists.newArrayList(); } }
@Override protected void createMetrics() { super.createMetrics(); this.rejectedEvents = getMetricContext().counter(RuntimeMetrics.GOBBLIN_JOB_MONITOR_SLAEVENT_REJECTEDEVENTS); }
@Override protected void createMetrics() { super.createMetrics(); this.messageParseFailures = this.getMetricContext().meter( RuntimeMetrics.GOBBLIN_JOB_MONITOR_KAFKA_MESSAGE_PARSE_FAILURES); }
@Override public Collection<Either<JobSpec, URI>> parseJobSpec(byte[] message) throws IOException { InputStream is = new ByteArrayInputStream(message); this.versionWriter.readSchemaVersioningInformation(new DataInputStream(is)); Decoder decoder = DecoderFactory.get().binaryDecoder(is, this.decoder.get()); try { T decodedMessage = this.reader.get().read(null, decoder); return parseJobSpec(decodedMessage); } catch (AvroRuntimeException | IOException exc) { this.messageParseFailures.mark(); if (this.messageParseFailures.getFiveMinuteRate() < 1) { log.warn("Unable to decode input message.", exc); } else { log.warn("Unable to decode input message."); } return Lists.newArrayList(); } }
@Override protected void createMetrics() { super.createMetrics(); }
@Override protected void createMetrics() { super.createMetrics(); this.rejectedEvents = getMetricContext().counter(RuntimeMetrics.GOBBLIN_JOB_MONITOR_SLAEVENT_REJECTEDEVENTS); }