public static AutoBalancerMetrics toAutoBalancerMetric(long nowMs,
                                                           int brokerId,
                                                           String brokerRack,
                                                           com.yammer.metrics.core.MetricName metricName,
                                                           double value,
                                                           String attribute) {
        Map<String, String> tags = mBeanNameToTags(metricName.getMBeanName());
        AutoBalancerMetrics ccm = tags == null ? null : toAutoBalancerMetric(nowMs, brokerId, brokerRack, metricName.getName(), tags, value, attribute);
        if (ccm == null) {
            throw new IllegalArgumentException(String.format("Cannot convert yammer metric %s to a Auto Balancer metric for "
                    + "broker %d at time %d for tag %s", metricName, brokerId, nowMs, attribute));
        }
        return ccm;
    }
Create a Auto Balancer Metric.

@param nowMs      The current time in milliseconds.
@param brokerId   Broker Id.
@param brokerRack Broker rack.
@param metricName Yammer metric name.
@param value      Metric value
@param attribute  Metric attribute.
@return A Yammer metric converted as a AutoBalancerMetric.
core/src/main/java/kafka/autobalancer/metricsreporter/metric/MetricsUtils.java