THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Class | Config | Reason |
---|---|---|
KafkaMetricsReporter | kafka.metrics.reporters | This interface is technically not part of the public API. Since MetricsReporter will not support it, it makes sense to not add it to this one either. |
ConsumerPartitionAssignor | partition.assignment.strategy | This interface does not have a close() method. This interface is being deprecated by KIP-848, hence I don't propose updating it. |
DeserializationExceptionHandler | default.deserialization.exception.handler | This interface does not have a close() method. |
ProductionExceptionHandler | default.production.exception.handler | This interface does not have a close() method. |
TimestampExtractor | default.timestamp.extractor | This interface does not have a close() method. |
RocksDBConfigSetter | rocksdb.config.setter | This interface does not have a close() method. |
SecurityProviderCreator | security.providers | This interface does not have a close() method. The instance is passed to java.security.Security and we don't control its lifecycle. |
ReplicationPolicy | replication.policy.class | MirrorMaker currently uses its own mechanism to emit metrics. This interface does not have a close() method. |
ConfigPropertyFilter | config.property.filter.class | MirrorMaker currently uses its own mechanism to emit metrics. |
GroupFilter | group.filter.class | MirrorMaker currently uses its own mechanism to emit metrics. |
TopicFilter | topic.filter.class | MirrorMaker currently uses its own mechanism to emit metrics. |
ForwardingAdmin | forwarding.admin.class | MirrorMaker currently uses its own mechanism to emit metrics. |
...
Code Block | ||
---|---|---|
| ||
public class MyInterceptor<K, V> implements ProducerInterceptor<K, V>, Monitorable { private Sensor sensor; private PluginMetrics metrics; public void withPluginMetrics(PluginMetrics metrics) { this.metrics = metrics; sensor = metrics.sensor("onSend"); MetricName rate = metrics.metricName("rate", "Average number of calls per second.", Collections.emptyMap()); MetricName total = metrics.metricName("total", "Total number of calls.", Collections.emptyMap()); sensor.add(rate, new Rate()); sensor.add(total, new CumulativeCount()); } @Override public ProducerRecord<K, V> onSend(ProducerRecord<K, V> record) { sensor.record(); return record; } @Override public void close() { try { if (metrics != null) metrics.close(); } catch (IOException e) { // Even though ProducerInterceptor extends AutoCloseable which has "void close() throws Exception;", ProducerInterceptor has its own close() method without "throws"! throw new RuntimeException(e); } } } |
...