Update MRRunningAppMetricBolt.java
authoryonzhang <yonzhang@ebay.com>
Tue, 3 Apr 2018 23:46:55 +0000 (16:46 -0700)
committeryonzhang <yonzhang@ebay.com>
Tue, 3 Apr 2018 23:46:55 +0000 (16:46 -0700)
Author: yizt
Reviewer: yonzhang

Closes #969

eagle-jpm/eagle-jpm-mr-running/src/main/java/org/apache/eagle/jpm/mr/running/storm/MRRunningAppMetricBolt.java

index aa62d30..9cb2510 100644 (file)
@@ -140,7 +140,7 @@ public class MRRunningAppMetricBolt extends BaseRichBolt {
                 Map<String, String> tags = generateMetricTags(level, app);
                 for (java.util.Map.Entry<String, String> entry : metrics.entrySet()) {
                     Method method = AppInfo.class.getMethod(entry.getValue());
-                    Integer value = (Integer) method.invoke(app);
+                    Integer value = Integer.valueOf(method.invoke(app).toString());
                     String metricName = String.format(entry.getKey(), level.name);
                     createMetric(appMetricEntities, timestamp, tags, metricName, value);
                 }