/** * Convert a Yammer metric to a CruiseControlMetric */ public static CruiseControlMetric toCruiseControlMetric(long now, int brokerId, com.yammer.metrics.core.MetricName metricName, double value, String attribute) { CruiseControlMetric ccm = toCruiseControlMetric(now, brokerId, metricName.getName(), yammerMetricScopeToTags(metricName.getScope()), value, attribute); if (ccm == null) { throw new IllegalArgumentException(String.format("Cannot convert yammer metric %s to a Cruise Control metric for " + "broker %d at time %d for tag %s", metricName, brokerId, now, attribute)); } return ccm; }
/** * Check if a yammer metric name is an interested metric */ public static boolean isInterested(com.yammer.metrics.core.MetricName metricName) { return isInterested(metricName.getGroup(), metricName.getName(), metricName.getType(), yammerMetricScopeToTags(metricName.getScope())); }
/** * Convert a Yammer metric to a CruiseControlMetric */ public static CruiseControlMetric toCruiseControlMetric(long now, int brokerId, com.yammer.metrics.core.MetricName metricName, double value, String attribute) { CruiseControlMetric ccm = toCruiseControlMetric(now, brokerId, metricName.getName(), yammerMetricScopeToTags(metricName.getScope()), value, attribute); if (ccm == null) { throw new IllegalArgumentException(String.format("Cannot convert yammer metric %s to a Cruise Control metric for " + "broker %d at time %d for tag %s", metricName, brokerId, now, attribute)); } return ccm; }
/** * Check if a yammer metric name is an interested metric */ public static boolean isInterested(com.yammer.metrics.core.MetricName metricName) { return isInterested(metricName.getGroup(), metricName.getName(), metricName.getType(), yammerMetricScopeToTags(metricName.getScope())); }