Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-5656

Support bulk attributes request on KafkaMbean where some attributes do not exist

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.0.0
    • clients
    • None

    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

          Activity

            People

              Unassigned Unassigned
              Erik.Kringen Erik Kringen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: