[
https://issues.apache.org/jira/browse/KAFKA-5656?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ismael Juma resolved KAFKA-5656.
--------------------------------
Resolution: Fixed
Fix Version/s: 1.0.0
> Support bulk attributes request on KafkaMbean where some attributes do not
> exist
> --------------------------------------------------------------------------------
>
> Key: KAFKA-5656
> URL: https://issues.apache.org/jira/browse/KAFKA-5656
> Project: Kafka
> Issue Type: Bug
> Components: clients
> Reporter: Erik Kringen
> Priority: Minor
> Fix For: 1.0.0
>
>
> According to Oracle documentation on [Implementing a Dynamic
> MBean|http://docs.oracle.com/cd/E19698-01/816-7609/6mdjrf83d/index.html]
> bq. 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.
> bq. 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
> {code}org.apache.kafka.common.metrics.JmxReporter.KafkaMbean#getAttributes{code}
> 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.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)