Description
According to Oracle documentation on Implementing a Dynamic MBean
The bulk getter and setter methods usually rely on the generic getter and setter, respectively. This makes them independent of the management interface, which can simplify certain modifications. In this case, their implementation consists mostly of error checking on the list of attributes. However, all bulk getters and setters must be implemented so that an error on any one attribute does not interrupt or invalidate the bulk operation on the other attributes.
If an attribute cannot be read, then its name-value pair is not included in the list of results. If an attribute cannot be written, it will not be copied to the returned list of successful set operations. As a result, if there are any errors, the lists returned by bulk operators will not have the same length as the array or list passed to them. In any case, the bulk operators do not guarantee that their returned lists have the same ordering of attributes as the input array or list.
The current implementation of
org.apache.kafka.common.metrics.JmxReporter.KafkaMbean#getAttributes
returns an empty list if any of the the requested attributes are not found.
This method should instead log the exception but allow all requested attributes that are present to be returned, as prescribed via the DynamicMBean interface.
Attachments
Issue Links
- links to